I have just installed SQL Server Compact Edition (including the SDK) for use with Borland Developer Studio 2006. I have an ADOConnection component on my form, but the Provider I want (Microsoft.SQLSERVER.MOBILE.OLEDB.3.0) is not available. Typing in the connection string: "Provider=Microsoft.SQLSERVER.MOBILE.OLEDB.3.0;Data Source=C:\Program Files\Microsoft SQL Server Compact Edition\v3.1\SDK\Samples\Northwind.sdf..." results in an "Unspecified Error". I have checked the HKEY_CLASSES_ROOT\CLSID and the provider associated with SQLCE is not there.
I've read a couple of posts indicating that it should have been registered during install. Is this the case or do I have to do something more to register this provider?
I've checked the assembly (system.data.sqlserverCe - it seems OK) and re-registered sqlceolebd30.dll. I'm not sure what else needs to be done.
TIA,
Luke
Have you downloaded and installed this? http://www.microsoft.com/downloads/details.aspx?FamilyId=%2085E0C3CE-3FA1-453A-8CE9-AF6CA20946C3&displaylang=en|||Thanks for you reply Erik.
I have downloaded that msi, along with the SSCE31SDK-ENU.msi.
On the link that you specified the Additional Information states in part that " Installing SQL Server 2005 Compact Edition by running SQLServerCE31-EN.msi installs the provider (System.Data.SqlServerCe.dll) in the GAC (global assembly cache) and registers the OLEDB provider (sqlceoledb30.dll)."
For some reason that hasn't happened. I'll look into some other way of registering the provider.
Thanks again.
|||
You can test if it is an OLEDB provider problem by running this VBA code in Excel/word or similar:
Code Snippet
Sub test()
Dim conn As New ADODB.Connection
conn.ConnectionString = "Provider=Microsoft.SQLSERVER.MOBILE.OLEDB.3.0;Data Source=C:\Program Files\Microsoft SQL Server Compact Edition\v3.1\SDK\Samples\Northwind.sdf"
conn.Open
End Sub
(remember to add a reference to "Microsoft ActiveX Data Objects 2.8 Library")
If this works, it is a 3rd party problem...
|||Thanks Erik. I tried that in Excel and it worked so I figured it must be Delphi related, and it was.For some reason I am not able to hook up the ADO components at design time - it raises an error. If I set the connection string at run time it works. I tried this yesterday with no luck, but this morning I uninstalled/reinstalled SQL Server Compact (with SDK and server tools) and the run time test worked, so I may well have done something with my original install that was causing me problems.
No comments:
Post a Comment