Connect to SQL Server Mobile Edition via VS2005 (Data Provider)

M

Martin Priebe

Hi,


I try to connect my application via Data Provider to my SQL Mobile DB.

With the ServerExplorer all works fine.
new Connection - via ActiveSync - Data Provider for SQL Server Mobile
Edition
.... fine !

But now i want to use this in my code.
I have the ConnectionString .. "Data Source = Mobile Device \ .... .sdf"
but how can i change my Data Provider? ('for SQL Server' to 'for for SQL
Server Mobile Edition')

When i use the namespace System.Data.SqlClient the SqlConnection class try
to connect with a "normal" Sql Server 2005 database.


Is there a possibility to fix that problem ?

I only want to use a SqlConnection in my code to connect my application with
the database on my device. (via ActiveSync)


thx a lot
Martin
 
D

dbgrick

Try using the System.Data.SqlCeClient namespace instead of
System.Data.SqlClient.

Regards,
Rick D.
 

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

Top