注册连接数据
来源:互联网 发布:通信网络建设与维护 编辑:程序博客网 时间:2024/05/19 02:41
try
{
string xingbie;
if(RadioButton1.Checked ==true)
{xingbie="男";}
else{xingbie="女";}
SqlConnection cn = new SqlConnection();
cn.ConnectionString ="Data Source = 405-22;database = bbs_data;uid = sa;pwd=";
SqlCommand com = new SqlCommand();
string a = "insert user_info (userID,userPWD,xingbie,shengri,email,qq) values ('"+TextBox1.Text+"','"+TextBox2.Text+"','"+xingbie+"','"+TextBox6.Text+"','"+TextBox4.Text+"','"+TextBox5.Text+"')";
com.CommandText = a;
com.Connection = cn;
cn.Open();
int i=com.ExecuteNonQuery();
cn.Close();
}
catch(SqlException ex)
{
Response.Write(ex.Message);
}
Response.Redirect("lt_back.aspx");
}
{
string xingbie;
if(RadioButton1.Checked ==true)
{xingbie="男";}
else{xingbie="女";}
SqlConnection cn = new SqlConnection();
cn.ConnectionString ="Data Source = 405-22;database = bbs_data;uid = sa;pwd=";
SqlCommand com = new SqlCommand();
string a = "insert user_info (userID,userPWD,xingbie,shengri,email,qq) values ('"+TextBox1.Text+"','"+TextBox2.Text+"','"+xingbie+"','"+TextBox6.Text+"','"+TextBox4.Text+"','"+TextBox5.Text+"')";
com.CommandText = a;
com.Connection = cn;
cn.Open();
int i=com.ExecuteNonQuery();
cn.Close();
}
catch(SqlException ex)
{
Response.Write(ex.Message);
}
Response.Redirect("lt_back.aspx");
}
- 注册连接数据
- 连接数据的登录注册退出页面(简化版)
- winForm +access 数据连接 出错 未在本地计算机上注册“Microsoft.Jet.OLEDB.12.0”
- ArcGIS Server数据注册
- 用户数据注册安全性
- 注册登录展示数据
- SQL 2005注册连接问题?
- c# 注册窗体 连接数据库
- 连接数据:
- 数据连接
- 数据连接
- BeanUtils注册数据转化类型
- okhttp登录 注册 请求数据
- [C#] 连接数据库并进行用户注册
- jdbc连接驱动器的注册加载
- ASP注册页面连接到数据库
- 设备节点注册和操作方法连接
- oracle 共享服务连接静态注册服务
- python 环境win下搭建 (自家用)
- 如何在VS.NET 2003中创建支持ASP.NETweb应用程序的环境
- 求集合子集,和全排列的递归算法实现(c++,Dev C++调试通过)
- 数据库管理员DBA
- 登陆连接数据
- 注册连接数据
- Google搜索从入门到精通v4.0 - 提问的智慧
- ajax技术的应用及总结
- 如何注册VS.net里的水晶报表
- UrlReWriter 使用经验小结
- 英文美句欣赏
- Web Service 初学
- C++学习资源(John Chen)
- 有关于微软的IWebBrowser2::Navigate2/Navigate方法