FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour ADO : doesn't work anymore
Posts: 166
Joined: Wed Aug 29, 2012 08:25 AM
ADO : doesn't work anymore
Posted: Sun Nov 06, 2016 09: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 (fw): Select all Collapse
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
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: ADO : doesn't work anymore
Posted: Sun Nov 06, 2016 09:07 PM

Franklin

see this post :

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

Rick Lipkin

&&

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: ADO : doesn't work anymore
Posted: 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

Continue the discussion