当前位置: 代码迷 >> Windows Mobile >> 有关TableAdapter,用过的请来给点意见,该怎么处理
  详细解决方案

有关TableAdapter,用过的请来给点意见,该怎么处理

热度:61   发布时间:2016-04-25 07:46:35.0
有关TableAdapter,用过的请来给点意见
systemdataTableAdapter st = new systemdataTableAdapter();
st.Connection.ConnectionString = "Data Source=temp.sdf;password=111111";
st.Connection.Open();
this.textBox1.Text = st.getKeyValue("user");
.
.
我用TableAdapter对手机本地的sql mobile数据库进行操作,具体代码如上;
但是这样的话将会造成没操作一个表就需要open一次connection,效率未免底下;
是否能打开一次connection然后所有的tableadapter都用呢?

------解决方案--------------------
http://msdn2.microsoft.com/en-us/library/ms171907(VS.80).aspx
  相关解决方案