- Code: Select all Expand view
- Function importDBF
local oCn, oRs
xString := ('Provider='+xPROVIDER+';Data Source='+xSOURCE+';Initial Catalog='+xCATALOGA+';User Id='+xUSERID+';Password='+xPASSWORD )
oCn := CREATEOBJECT("ADODB.Connection")
TRY
oCn:Open(xString)
catch oErr
?"Unable to read the database"
return(.F.)
END TRY
TRY
FW_AdoImportFromDBF( oCn,"&dbtest" )
catch oErr
?"Unable to insert information"
return(.F.)
END TRY
?"Insert successful"
oCn:Close()
return nil
The table is created in SQL, but empty, I got the error:
I am using
FWH 16.04
Harbour bcc77