SQL_添加语句
来源:互联网 发布:arcgis for js 点闪烁 编辑:程序博客网 时间:2024/05/22 00:50
SqlConnection con = new SqlConnection("Server=localhost;database=qcwx;uid=sa;pwd=sasasa");
con.Open();
SqlCommand cmd =new SqlCommand("InsertDate5", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@s_name",SqlDbType.VarChar, 50).Value = this.tname.Text;
cmd.Parameters.Add("@s_sex",SqlDbType.VarChar, 50).Value = this.RadioButtonList1.SelectedValue;
cmd.Parameters.Add("@s_birthday",SqlDbType.VarChar, 50).Value = this.tdate.Text;
cmd.Parameters.Add("@s_phone",SqlDbType.VarChar, 50).Value = this.tcell.Text;
cmd.Parameters.Add("@s_mobile",SqlDbType.VarChar, 50).Value = this.tphone.Text;
cmd.Parameters.Add("@s_email",SqlDbType.VarChar, 50).Value = this.temail.Text;
cmd.Parameters.Add("@s_registerDate",SqlDbType.VarChar, 50).Value = this.ttime.Text;
cmd.Parameters.Add("@s_password",SqlDbType.VarChar, 16).Value = this.tpass1.Text;
cmd.Parameters.Add("@s_logname",SqlDbType.VarChar, 16).Value = this.tname0.Text;
try
{
cmd.ExecuteNonQuery();
MessageBox.Show("用户信息添加成功!");
}
catch (Exception err)
{
throw new System.Exception(err.Message);
}
finally
{
con.Close();
}
- SQL_添加语句
- SQL_搜索语句
- SQL_基础语句
- SQL_六句实用语句整理
- SQL_电力抢修工程插入数据语句
- [SBO](转)SQL_查询语句(库龄分析报表)
- Sql_使用meger语句提高数据批量操作效率
- SQL_触发器
- SQL_触发器
- sql_优化
- SQL_事务
- SQL_优化
- sql_行转列
- SQL_分页
- 数据库添加约束语句
- 360必须添加语句
- 数据库--添加字段语句
- sql语句添加主键
- jdbc 操作mysql数据库
- 让busybox里的free命令可以显示page cache
- javascript Number 使用
- oracle中的exists 和not exists 用法详解
- Javascript中最常用的55个经典技巧
- SQL_添加语句
- Linux 中 x86 的内联汇编
- 简单的 vim 配置
- JAVA——HellowWorld——初学第一课
- 只能进入grub,无法启动windows
- 如何远程登录linux图形界面
- 第六周任务(1)
- linux下,qemu模拟Zynq-7000 EPP可扩展处理平台的搭建过程
- 款免费的PHP加速器:APC、eAccelerator、XCache比较