帮助使用C#的sqlce? [英] help with sqlce using c# ?

查看:78
本文介绍了帮助使用C#的sqlce?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 使用 System.Data.SqlServerCe;

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



如何获取连接字符串.

以及为什么连接名称未出现在项目列表中.

解决方案

签出 http ://www.connectionstrings.com [ ^ ].

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

objConnection = new SqlConnection("Your Connection string")
objConnection.Open();


在创建新的 SqlCeConnection.ConnectionString [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 .

解决方案

Check out http://www.connectionstrings.com[^].


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

objConnection = new SqlConnection("Your Connection string")
objConnection.Open();


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.


这篇关于帮助使用C#的sqlce?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆