connection problem

  • Thread starter Thread starter e-mid
  • Start date Start date
E

e-mid

i am trying to connect a database on sql server ce:

connString = "Provider=Microsoft.SQLServer.OLEDB.CE.1.0; Data Source=\\My
Documents\\test.sdf";

conn = new SqlCeConnection(connString);

i got following error:

"Unknown connection option in connection string: provider"

what is the problem here?
 
e-mid said:
i am trying to connect a database on sql server ce:

connString = "Provider=Microsoft.SQLServer.OLEDB.CE.1.0; Data Source=\\My
Documents\\test.sdf";

conn = new SqlCeConnection(connString);

i got following error:

"Unknown connection option in connection string: provider"

what is the problem here?

Exactly what it says - you're specifying a provider, and it doesn't
know what that is. Look at the SqlCeConnection.ConnectionString
property for more information. You should just be able to get rid of
that part of the connection string, and all will work.
 
yes , it works when i cut provider part.
i get this connection string from msdn, it is interesting that it does not
work. i also
tried with version 2.0 but it is no use..
 
e-mid said:
yes , it works when i cut provider part.
i get this connection string from msdn, it is interesting that it does not
work. i also
tried with version 2.0 but it is no use..

Where did you get it from in MSDN? Was it specifically for use with
SqlCeConnection, or something else?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top