I want to fill a MS SQL Mobile (SDF) database with records from a DBF file.
So i hoped this is working:
oConnSDF=Createobject("ADODB.Connection")
oConnSDF.open("Provider=Microsoft.SQLSERVER.MOBILE.OLEDB.3.0;Data Source=myfile.sdf;")
USE SOURCE
DO WHILE NOT EOF()
cSQL = "INSERT INTO target(field1,field2) values('" + ;
source->veld1 + "','" + ;
source->veld2 + "')"
oConnSDF.Execute( cSQL)
SKIP 1
ENDDO
but this results in a cryptic error message: "OLE IDispatch exception code 0 from Microsoft SQL Server Compact Edition OLE DB Provider: the command contained one or more erorrs. [,,,,,],,"
Maybe my approach is all wrong?
So i hoped this is working:
oConnSDF=Createobject("ADODB.Connection")
oConnSDF.open("Provider=Microsoft.SQLSERVER.MOBILE.OLEDB.3.0;Data Source=myfile.sdf;")
USE SOURCE
DO WHILE NOT EOF()
cSQL = "INSERT INTO target(field1,field2) values('" + ;
source->veld1 + "','" + ;
source->veld2 + "')"
oConnSDF.Execute( cSQL)
SKIP 1
ENDDO
but this results in a cryptic error message: "OLE IDispatch exception code 0 from Microsoft SQL Server Compact Edition OLE DB Provider: the command contained one or more erorrs. [,,,,,],,"
Maybe my approach is all wrong?