I am trying to add a new record:
#include "fivewin.ch"
#include "dbinfo.ch"
#include "adodef.ch"
#include "xbrowse.ch"
#include "Set.ch"
REQUEST HB_Lang_ES
REQUEST HB_CODEPAGE_ESWIN
FUNCTION MAIN()
聽 聽local cStr, oCn, oRs
聽 聽local oData
聽 聽// Idioma espa帽ol
聽 聽HB_LangSelect("ES") // Para mensajes, fechas, etc..
聽 聽HB_CDPSELECT("ESWIN") // Para ordenaci贸n, requiere CodePage.lib
聽 聽// Driver CDX----------------------------------------------------------------
聽 聽REQUEST DBFCDX, DBFFPT
聽 聽RDDSETDEFAULT( "DBFCDX")
聽 聽SET DATE TO ITALIAN
聽 聽SET EPOCH TO 1990
聽 聽cStr 聽:= "Driver={MySQL ODBC 3.51 Driver};Server=db4free.net;" + ;
聽 聽 聽 聽 聽 聽 "Database=pruebasado;User=pruebasado;Password=123456;Option=3;"
聽 聽oCn 聽 := FW_OpenAdoConnection( cStr )
聽 聽oRs 聽 := FW_OpenRecordSet( oCn, "select * from clientes" )
聽 聽if oRs = nil
聽 聽 聽 msgstop("error opening recordset")
聽 聽 聽 oCn:Close()
聽 聽 聽 RETURN NIL
聽 聽endif
聽 聽xbrowser oRs
oData := TDataRow():New( oRs, nil, .T. )
oData:registro := 1
oData:nombre 聽 := "Cliente a帽adido por Lucas3"
oData:email 聽 聽:= "mi email"
MsgInfo(oData:Modified(), "IsModified")
oData:Save()
xbrowser oRs
聽oCn:Close()
聽QUIT
RETURN NIL
//----------------------------------------------------------------------------//This is the error:
Application
===========
Path and name: C:\ADO\DATAROW.exe (32 bits)
Size: 2,876,928 bytes
Compiler version: Harbour 3.2.0dev (Rev. 18881)
FiveWin Version: FWH 13.05
Windows version: 6.1, Build 7601 Service Pack 1
Time from start: 0 hours 0 mins 5 secs
Error occurred at: 09-06-13, 12:05:44
Error description: Error BASE/1004 Message not found: TDATAROW:ADDNEW
Stack Calls
===========
Called from: .\source\function\HARBOUR.PRG => _CLSSETERROR( 234 )
Called from: .\source\classes\DATAROW.PRG => TDATAROW:ADDNEW( 543 )
Called from: .\source\classes\DATAROW.PRG => TDATAROW:SAVEADO( 355 )
Called from: .\source\classes\DATAROW.PRG => TDATAROW:SAVE( 279 )
Called from: datarow.prg => MAIN( 79 )
Thank you.
What is the problem?.
Un saludo, Best regards,
Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producci贸n]
Implementando MSVC 2010, FWH64 y ADO.
Abandonando uso xHarbour y SQLRDD.