public static SqlCeConnection getCeConnection()
{
// 创建 SQL Server Mobile 数据库连接
SqlCeConnection conn = null;
try
{
conn = new SqlCeConnection();
conn.ConnectionString ="Data Source ="
+ (System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)
+ (" //yy//" + getDataSource()+ ";"
+ ("Password =" + "/""+getPassword()+"/";")));
conn.Open();
}
catch (SqlCeException e)
{
Console.WriteLine(e.StackTrace);
throw e;
}
return conn;
}
{
// 创建 SQL Server Mobile 数据库连接
SqlCeConnection conn = null;
try
{
conn = new SqlCeConnection();
conn.ConnectionString ="Data Source ="
+ (System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)
+ (" //yy//" + getDataSource()+ ";"
+ ("Password =" + "/""+getPassword()+"/";")));
conn.Open();
}
catch (SqlCeException e)
{
Console.WriteLine(e.StackTrace);
throw e;
}
return conn;
}