操作数据库中的数据总结.pdfVIP

  • 7
  • 0
  • 约4.84万字
  • 约 26页
  • 2021-10-24 发布于福建
  • 举报
目 录 web.config 里面的连接字符串 2 4.1 连接 SQL Server 数据库 2 5.1 使用 SqlCommand 对象执行数据库的操作 4 5.2 使用 SqlDataReader 对象读取数据 6 5.3 数据列、数据行和数据表 7 5.4 构建 DataSet对象 9 5.5 使用 SqlDataAdapter 对象填充数据集 11 5.6 添加表之间的关系对象 DataRelation 12 5.7 添加表之间的约束对象 C onstraint 15 5.8 使用 DataView 对象过滤数据集 17 5.9 以 XML 格式读取数据 18 5.10 DataSet 对象和 XML 格式数据之间的转换 20 5.11 使用访问数据库的参数 2 1 5.12 使用 ADO.NET 中的事务 24 1 web.config 里面的连接字符串 connectionStrings //1 、使用 mv2008自带的 sqlexpress 数据库 add name= SQLSERVERCONNECTIONSTRING connectionString = Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Inetpub\wwwroot\WebSite\App_Data\DataBase.mdf;Integr ated Security=True;Connect Timeout=30;User Instance=True providerName = System.Data.SqlClient / //2 、使用 sql 数据库 add name= localserverstring connectionString = Data Source=(local);user id=sa;pwd=123456;database=mydatabase.mdf providerName = System.Data.SqlClient / //3 、使用 access 数据库的 ODBC数据源 add name= ODBCCONNECTIONSTRING connectionString = DSN=OdbcDataSource / add name= OLEDBCONNECTIONSTRING connectionString = Provider=Microsoft.Jet.OLEDB.4.0;DataSource= / //4 、使用 mv2008自带的 sqlexpress 数据库 add name= ConnectionString000 connectionString = Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\DataBase.mdf;Integrated Security=True;User Instance=True providerName = System.Data.SqlClient / / connectionStrings 4.1 连接 SQL Server 数据库 using System; u

文档评论(0)

1亿VIP精品文档

相关文档