[AccessD] Access FE to SQL Server Compact BE

Gustav Brock gustav at cactus.dk
Sat Oct 18 02:49:43 CDT 2008


Hi Doug

Sounds like you need to run the SQL Server 2005 CE install anyway.
It probably does more than just registering the dll.

/gustav

>>> dbdoug at gmail.com 18-10-2008 01:30 >>>
Hello All:

I am trying to connect to a SQL Server Compact edition db (.sdf) from Access
2003.  Here's the start of my code:

Const sdfPath = "C:\SSCE\AmphiData.sdf"

Dim pConn as ADODB.Connection

Set pConn = new ADODB.Connection

pConn.ConnectionString = "PROVIDER=Microsoft.SQLSERVER.CE.OLEDB.3.5;Data
Source = " & sdfPath
pConn.Open

The .Open command fails with error: Method 'Open' of object '_Connection'
failed.

The path to the .sdf file is correct; I don't have SSCE installed on this
computer but I did register the file "SQLCEOLEDB35.dll".  Before I
registered the dll I got a 'Provider not found' error, so I assume that I
got the right dll.

I'm not sure how to proceed from here - does anyone have a suggestion?

Thanks,

Doug Steele





More information about the AccessD mailing list