| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 674 人关注过本帖
标题:[求助]我想要Sql Server连接textBox的。有添加,修改,删除等操作的。
只看楼主 加入收藏
qiaominghao
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2005-10-23
收藏
 问题点数:0 回复次数:2 
[求助]我想要Sql Server连接textBox的。有添加,修改,删除等操作的。
我想要Sql Server连接textBox的。有添加,修改,删除等操作的。
最好是有多个表的操作。
嘎嘎,是不是为难你了呢
搜索更多相关主题的帖子: textBox Sql Server 删除 
2005-10-29 16:16
wj2051
Rank: 1
等 级:新手上路
帖 子:53
专家分:0
注 册:2005-8-24
收藏
得分:0 

用DataBind方法,把数据绑定到textBox上


2005-10-29 18:02
唐伯猫
Rank: 8Rank: 8
等 级:贵宾
威 望:45
帖 子:5323
专家分:58
注 册:2005-8-9
收藏
得分:0 
this.sqlInsertCommand2.Parameters["@Id"].Value=textBox1.Text;
this.sqlInsertCommand2.Parameters["@name"].Value=textBox2.Text;
this.sqlInsertCommand2.Parameters["@Sex"].Value=textBox3.Text;
this.sqlInsertCommand2.Parameters["@Age"].Value=textBox4.Text;
this.sqlInsertCommand2.Parameters["@Telephone"].Value=textBox5.Text;
this.sqlInsertCommand2.Parameters["@Code"].Value=textBox6.Text;
this.sqlInsertCommand2.Connection.Open();
this.sqlInsertCommand2.ExecuteNonQuery();
this.sqlInsertCommand2.Connection.Close();
this.sqlConnection1.Open();
this.sqlDataAdapter2.Fill(this.dataSet11);
this.sqlConnection1.Close();
this.dataGrid1.Update();
this.dataGrid1.Refresh();
this.textBox1.Text="";this.textBox2.Text="";
this.textBox3.Text="";this.textBox4.Text="";
this.textBox5.Text="";this.textBox6.Text="";




this.sqlDeleteCommand3.CommandText="delete from 表名 where Id='"+this.textBox12.Text.Trim()+"'or Name='"+this.textBox11.Text.Trim()+"'or Sex='"+this.textBox10.Text.Trim()+"'or Age='"+this.textBox9.Text.Trim()+"'or Telephone='"+this.textBox8.Text.Trim()+"'or Code='"+this.textBox7.Text.Trim()+"'";
this.sqlDeleteCommand3.Connection.Open();
this.sqlDeleteCommand3.ExecuteNonQuery();
this.dataSet11.Clear();
this.sqlDataAdapter1.Fill(this.dataSet11);
this.sqlDeleteCommand3.Connection.Close();
this.textBox12.Text="";this.textBox11.Text="";
this.textBox10.Text="";this.textBox9.Text="";
this.textBox8.Text="";this.textBox7.Text="";

<iframe name="alimamaifrm" frameborder="0" marginheight="0" marginwidth="0" border="0" scrolling="no" width="300" height="170" src="/go/app/tbk_app/chongzhi_300_170.php?pid=mm_28854300_2441872_11377541&page=chongzhi_300_170.php&size_w=300&size_h=170&stru_phone=1&stru_game=1&stru_travel=1" ></iframe>
2005-10-30 13:39
快速回复:[求助]我想要Sql Server连接textBox的。有添加,修改,删除等操作的。
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.025957 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved