ADO : doesn't work anymore

ADO : doesn't work anymore

Postby Franklin Demont » Sun Nov 06, 2016 9:23 am

Hello ,

I used to work with ADO (mdb-files) , till last month no problems.

Since then i can't changed data in a mdb-file , i.e.
(see also viewtopic.php?f=3&t=33115)
Code: Select all  Expand view

oRs                 := TOleAuto():New( "ADODB.Recordset" )
oRs:CursorType      := 1        // opendkeyset
oRs:CursorLocation  := 3        // local cache
oRs:LockType        := 3        // lockoptimistic
               
try
   oRs:Open( "SELECT * FROM " + cTable, oCon ) // Password="abc" )
catch oError
   MsgInfo( oError:Description )
end
?  oRs:CursorType , oRs:CursorLocation , oRs:LockType  // 3,3,3 !!!!!
// Is it normal that cursortype is changed in 3 ?  

DBG oRs  // Shows correct

oRs:MoveFirst()
oRs:Fields("ROW2"):Value := "Test"
oRs:Update()   <= ERROR , due to previous line
 


Error description: (DOS Error -2147352567) WINOLE/1007 Kan de bij te werken rij niet vinden. Sommige waarden zijn mogelijk veranderd sinds de rij voor het laatst is gelezen. (0x80040E38): Microsoft Cursor Engine

(Can not fint row to work on. Some values can be changed after the row was read)


Also when i try to use older versions from fivedbu i get this error. The most recent doesn't generate a error but doesn't changed the data

I suppose something has changed in the environnement , but i have no idea to restore it.

Is there a key in regedit ? Maybe a download ?

Frank
test
Franklin Demont
 
Posts: 166
Joined: Wed Aug 29, 2012 8:25 am

Re: ADO : doesn't work anymore

Postby Rick Lipkin » Sun Nov 06, 2016 9:07 pm

Franklin

see this post :

viewtopic.php?f=3&t=26102&start=15

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2663
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: ADO : doesn't work anymore

Postby nageswaragunupudi » Mon Nov 07, 2016 12:49 am

? oRs:CursorType , oRs:CursorLocation , oRs:LockType // 3,3,3 !!!!!
// Is it normal that cursortype is changed in 3 ?


Always and at all times, a client side record-set is opened with cursor-type adOpenStatic only, whatever cursortype we specify while opening the recordset. In other words, it is just useless and meaningless for us to specify a cursor type while openining a recordset with cursorlocation adUseClient.

This has been the behavior since ADO was created. There is nothing surprising or unusual about it.

Again, it is not that ADO was made like that. It is because with all RDBMSs, all client side cursors are static cursors.

Exceptions are (1) ADS and (2) one table at a time per one connection of MSSQL.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 80 guests