Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem Opening SDF Database on Desktop

44 views
Skip to first unread message

Tom Holmes Jr.

unread,
Jul 11, 2007, 10:35:08 PM7/11/07
to
I have copied the SDF (SQL Compact Edition) file to the desktop. I
remember writing code to open to this file, but I can't remember how I did
it. So, here is what I am doing:

Dim oConn As OleDb.OleDbConnection

oConnect = ""
oConnect = oConnect +
"Provider=Microsoft.SqlServer.Mobile.OleDb.3.0;"
oConnect = oConnect + "Data
Source=C:\\PROJECTS\\BRISTOL\\bcmcp.sdf;"
oConnect = oConnect + "Password=mypassword;"

'Instantiate the connectors
oConn = New OleDbConnection()
oConn.ConnectionString = oConnect

'*** Open connection
oConn.Open()

I get this error message:
Multiple-step OLE DB operation generated errors. Check each OLE DB status
value, if available. No work was done.

Just wondering ... can I use OLEDB Connection? I used OLEDB Connection to
open to an Access MDB file.
I want to open to this SDF file which is on the desktop .... NOT the device.

Thanks!
Tom


Tom Holmes Jr.

unread,
Jul 11, 2007, 11:12:59 PM7/11/07
to
Never mind ... I got it with the OLEDbConnection, but this is the string
that worked.

oConnect = ""
oConnect = oConnect +

"Provider=Microsoft.SQLSERVER.MOBILE.OLEDB.3.0;"


oConnect = oConnect + "Data
Source=C:\\PROJECTS\\BRISTOL\\bcmcp.sdf;"

oConnect = oConnect + "Persist Security Info=False;"
oConnect = oConnect + "SSCE:Database Password=mypassword;"

"Tom Holmes Jr." <t...@tomholmes.net> wrote in message
news:eHKuC1C...@TK2MSFTNGP06.phx.gbl...

anbu selvan

unread,
Jul 31, 2010, 4:41:59 AM7/31/10
to
using this connection string

string strConn = "Provider=Microsoft.SQLSERVER.CE.OLEDB.3.5;Data Source=C:\\newservice\\UserDataBase\\demo1.sdf;SSCE:Database Password=MyPassword";


Tom Holmes Jr. wrote:

Problem Opening SDF Database on Desktop
11-Jul-07

Dim oConn As OleDb.OleDbConnection

'*** Open connection
oConn.Open()

Thanks!
Tom

Previous Posts In This Thread:

On Wednesday, July 11, 2007 10:35 PM
Tom Holmes Jr. wrote:

Problem Opening SDF Database on Desktop

Dim oConn As OleDb.OleDbConnection

'*** Open connection
oConn.Open()

Thanks!
Tom

On Wednesday, July 11, 2007 11:12 PM
Tom Holmes Jr. wrote:

Never mind ...


Never mind ... I got it with the OLEDbConnection, but this is the string
that worked.

oConnect = ""
oConnect = oConnect +
"Provider=Microsoft.SQLSERVER.MOBILE.OLEDB.3.0;"


oConnect = oConnect + "Data
Source=C:\\PROJECTS\\BRISTOL\\bcmcp.sdf;"

oConnect = oConnect + "Persist Security Info=False;"
oConnect = oConnect + "SSCE:Database Password=mypassword;"

"Tom Holmes Jr." <t...@tomholmes.net> wrote in message
news:eHKuC1C...@TK2MSFTNGP06.phx.gbl...


Submitted via EggHeadCafe - Software Developer Portal of Choice
A Comparison of Managed Compression Algorithms
http://www.eggheadcafe.com/tutorials/aspnet/71485ecc-2d2d-435a-9c35-3d12b279f9ae/a-comparison-of-managed-compression-algorithms.aspx

0 new messages