S
Spiros
Dear Friennds
For the purpose of testing I wrote the following code...
Sub SyncStockItems()
Dim pConn As ADODB.Connection
Dim pRs As ADODB.Recordset
Set pConn = New ADODB.Connection
Set pRs = New ADODB.Recordset
pConn.ConnectionString = "PROVIDER=Microsoft.SQLSERVER.CE.OLEDB.3.5;Data
Source=C:\Apog\Apog.sdf"
-----'pConn.ConnectionString =
"PROVIDER=Microsoft.SQLSERVER.MOBILE.OLEDB.3.0;Data Source=C:\Apog\Apog.sdf"
If pConn.State = 1 Then
pConn.Close
End If
pConn.Open
'Delete All Records from Mobile Database
pConn.Execute "DELETE * FROM StockItems"
'pRs.Open
pRs.Close
pConn.Close
Set pRs = Nothing
Set pConn = Nothing
In debugging mode when the line pConn.Open reached it produces the following
error:
"Run-time error -2147467259 (800004005)
Method "Open" of object '_Connection' failed.
Any ideas of what it may be...?
Thank you in advance...
Spiros..
For the purpose of testing I wrote the following code...
Sub SyncStockItems()
Dim pConn As ADODB.Connection
Dim pRs As ADODB.Recordset
Set pConn = New ADODB.Connection
Set pRs = New ADODB.Recordset
pConn.ConnectionString = "PROVIDER=Microsoft.SQLSERVER.CE.OLEDB.3.5;Data
Source=C:\Apog\Apog.sdf"
-----'pConn.ConnectionString =
"PROVIDER=Microsoft.SQLSERVER.MOBILE.OLEDB.3.0;Data Source=C:\Apog\Apog.sdf"
If pConn.State = 1 Then
pConn.Close
End If
pConn.Open
'Delete All Records from Mobile Database
pConn.Execute "DELETE * FROM StockItems"
'pRs.Open
pRs.Close
pConn.Close
Set pRs = Nothing
Set pConn = Nothing
In debugging mode when the line pConn.Open reached it produces the following
error:
"Run-time error -2147467259 (800004005)
Method "Open" of object '_Connection' failed.
Any ideas of what it may be...?
Thank you in advance...
Spiros..