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?
 
Back
Top