Discussion:
Problem Opening SDF Database on Desktop
(too old to reply)
Tom Holmes Jr.
2007-07-12 02:35:08 UTC
Permalink
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.
2007-07-12 03:12:59 UTC
Permalink
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;"
Post by Tom Holmes Jr.
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
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()
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
anbu selvan
2010-07-31 08:41:59 UTC
Permalink
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

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.OleDbConnectio

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 connector
oConn = New OleDbConnection(
oConn.ConnectionString = oConnec

'*** Open connectio
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

Previous Posts In This Thread:

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

Problem Opening SDF Database on Desktop
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.OleDbConnectio

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 connector
oConn = New OleDbConnection(
oConn.ConnectionString = oConnec

'*** Open connectio
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

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." <***@tomholmes.net> wrote in message news:***@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
Loading...