I have this sample
( FW June 2014 )
=========
- Code: Select all Expand view
- #include "FiveWin.ch"
#include "xbrowse.ch"
function Main()
local oCon := TOleAuto():New( "ADODB.Connection" )
local oRs := TOleAuto():New( "ADODB.Recordset" )
local aTables := {}, cTable
local oError
Local oDlg,oBrw
Local cString := ""
cString := "DRIVER={MySQL ODBC 3.51 Driver};" + ;
"server=192.168.0.23" + ;
";database=MastroSQL" +;
";uid=Maurizio" + ;
";pwd=xxxxxx"
oCon:Open( cString)
oRs:CursorType = 1 // opendkeyset
oRs:CursorLocation = 3 // local cache
oRs:LockType = 3 // lockoportunistic
try
oRs:Open( "SELECT * FROM art_lis WHERE art_lis.corto = 935 " , oCon )
catch oError
MsgInfo( oError:Description )
end
DEFINE DIALOG oDlg FROM 0, 0 TO 400, 400 PIXEL
@ 0,0 XBROWSE oBrw OF oDlg RECORDSET oRs ;
HEADER "corto" ,"vend","scon";
COLUMNS "corto" ,"vend","scon"
oBrw:aCols[2]:nEditType := EDIT_GET
oBrw:aCols[2]:bOnPostedit := { | o, cVal | Test(oRs,cVal) }
oBrw:CreateFromCode()
ACTIVATE DIALOG oDlg CENTER
return nil
Function Test(oRs,cVal)
oRs:Fields( "scon" ):Value := 10
oRs:Fields( "vend" ):Value := cVal
oRs:Update()
Return nil
When I edit columns 2 ( after 3 o 4 times) I have this error :
- Code: Select all Expand view
- Time from start: 0 hours 0 mins 2 secs
Error occurred at: 09/09/14, 10:35:36
Error description: (DOS Error -2147352567) WINOLE/1007 Impossibile individuare la riga specificata per l'aggiornamento. È possibile che alcuni valori siano stati modificati dopo l'ultima operazione di lettura. (0x80040E38): Microsoft Cursor Engine
Args:
[ 1] = N 0
Stack Calls
===========
Called from: => TOLEAUTO:MOVE( 0 )
Called from: .\source\classes\XBROWSE.PRG => ADOSKIP( 8356 )
Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE_SETADO( 4533 )
Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE( 442 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:SKIP( 0 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:PAINT( 1510 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:DISPLAY( 1365 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1699 )
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT( 12264 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3279 )
Called from: => DIALOGBOXINDIRECT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 277 )
Called from: .\source\function\ERRSYSW.PRG => ERRORDIALOG( 418 )
Called from: .\source\function\ERRSYSW.PRG => (b)ERRORSYS( 23 )
Called from: => TOLEAUTO:UPDATE( 0 )
Called from: accesstest.prg => TEST( 60 )
Called from: accesstest.prg => (b)MAIN( 47 )
Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:POSTEDIT( 11635 )
Called from: .\source\classes\XBROWSE.PRG => EDITGETLOSTFOCUS( 11326 )
Called from: .\source\classes\XBROWSE.PRG => (b)TXBRWCOLUMN_EDIT( 11216 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:LOSTFOCUS( 2964 )
Called from: .\source\classes\CONTROL.PRG => (b)TCONTROL( 170 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:LOSTFOCUS( 0 )
Called from: .\source\classes\TGET.PRG => TGET:LOSTFOCUS( 1216 )
Called from: .\source\classes\CONTROL.PRG => TGET:KILLFOCUS( 1083 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1696 )
Called from: .\source\classes\TGET.PRG => TGET:HANDLEEVENT( 589 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3279 )
Called from: => SYSREFRESH( 0 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:KEYCHAR( 829 )
Called from: .\source\classes\TGET.PRG => TGET:KEYCHAR( 1117 )
Called from: => TWINDOW:HANDLEEVENT( 0 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1733 )
Called from: .\source\classes\TGET.PRG => TGET:HANDLEEVENT( 589 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3279 )
Called from: => DIALOGBOXINDIRECT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 277 )
Called from: accesstest.prg => MAIN( 51 )
any help is appreciated
Maurizio
http://www.nipeservice.com