c# 对数据库的操作
摘要:
1.首先需要引用using System.Data.SqlClient;2.创建连接SqlConnection connection = new SqlConnection();connection.ConnectionString = "Data Source= IP地址; Initial Catalog = 数据库名称; User ID = 数据库用户名; Password=密码";connection.Open(); //开启连接3.执行操作数据库表名称:Test 参数:ID(主键),Name,Age //添加数据private void button1_Click( 阅读全文
posted @ 2013-06-18 13:35 Hai_阔天空 阅读(282) 评论(0) 推荐(0)
浙公网安备 33010602011771号