Here is the actual error:
Error description: Error ADODB.Recordset/6 DISP_E_UNKNOWNNAME: FIELDGET
Here is my code:
- Code: Select all Expand view
#include "Fivewin.ch"
#include "Tcbrowse.ch"
#define TABLE "ERROR_CODES"
FUNCTION MAIN()
LOCAL oRs, oErr
LOCAL cFile:= "TIPDATA.MDB"
oRs = CREATEOBJECT( "ADODB.Recordset" )
TRY
oRS:Open( "SELECT * FROM " + TABLE, "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=tipdata.mdb", 1, 3 )
CATCH oErr
? oErr:Description
RETURN NIL
END TRY
msgInfo( oRS:eof ) // OK
msgInfo( oRS:FieldGet(1) ) // Error
msgInfo( oRS:Fields("ERROR_CODE"):value ) // Error