ADO : doesn't work anymore

Post Reply
Franklin Demont
Posts: 166
Joined: Wed Aug 29, 2012 8:25 am

ADO : doesn't work anymore

Post by Franklin Demont »

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 http://forums.fivetechsupport.com/viewt ... =3&t=33115)

Code: Select all

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
User avatar
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: ADO : doesn't work anymore

Post by Rick Lipkin »

Franklin

see this post :

http://forums.fivetechsupport.com/viewt ... 2&start=15

Rick Lipkin
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: ADO : doesn't work anymore

Post by nageswaragunupudi »

? 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
Post Reply