首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > 数据库连接

数据库连接

  • 资源大小:41.05 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: sql,c#

资 源 简 介

本资源为连接数据库的基本操作,  private void button3_Click(object sender, EventArgs e)         {             string user = textBox1.Text;             string pwd = textBox2.Text;             string code = textBox3.Text;             //创建数据库连接类的对象             SqlConnection con = new SqlConnection("server=FSMOOTH-PC;database=zxl;user=sa;pwd=fsmooth19841019");             con.Open();             //执行con对象的函数,返回一个SqlCommand类型的对象             SqlCommand cmd = con.CreateCommand();             //拼写语句             cmd.CommandText = "update users set name="" + user + "",pwd="" + pwd + "" where code="

文 件 列 表

数据库连接
数据库连接
数据库连接.sln
数据库连接.suo
VIP VIP
0.175528s