Click here to Skip to main content
15,921,646 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
C#
using System.Data.SqlServerCe;

SqlCeConnection  myConnection= new SqlCeConnection();
SqlCeConnection myConnection2 = new SqlCeConnection();


how can I get the connection string.

and why the connection name does not appear in the list of items .
Posted
Updated 16-May-11 23:32pm
v2
Comments
Mohammed Ahmed Gouda 17-May-11 5:54am    
which database engine to use with windows mobile 5 or higher

 
Share this answer
 
using System.Data.SqlClient;
  
private SqlConnection objConnection = null;
private SqlCommand objCommand = null;

objConnection = new SqlConnection("Your Connection string")
objConnection.Open();
 
Share this answer
 
Comments
Mohammed Ahmed Gouda 17-May-11 5:45am    
this is sqlce not normal sql
You set the connection string at creation of a new SqlCeConnection(string)[^] or you can you SqlCeConnection.ConnectionString[^] property.

If you what to read out connectionstring you do it via SqlCeConnection.ConnectionString.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900