连接数据库SQL Sever <connectionStrings> <add name="sqlservercon" connectionString="Data Source=PC-YZC\SQLEXPRESS;Initial Catalog=News;Persist Security Info=True;User ID=sa;Password=19920514"/> </connectionStrings> Data Source=PC-YZC\SQLEXPRESS 服务器名称 Initial Catalog=News 数据库名称 身份验证 SQL Sever身份验证 User ID=sa 用户名 Password=19920514 密码 启动缓存 cd C:\Windows\Microsoft.NET\Framework\v4.0.30319 aspnet_regsql -C "Data Source=PC-YZC\SQLEXPRESS;Initial Catalog=News;Persist Security Info=True;User ID=sa;Password=19920514" -ed -et -t "T_News1" 停止缓存 cd C:\Windows\Microsoft.NET\Framework\v4.0.30319 aspnet_regsql -C "Data Source=PC-YZC\SQLEXPRESS;Initial Catalog=News;Persist Security Info=True;User ID=sa;Password=19920514" -dd ================================================================================================= 连接数据库 Oracle <connectionStrings> <add name="oraclecon" connectionString="Data Source=orcl;Persist Security Info=True;User ID=yaozc;Password=yaozc;Unicode=True" providerName="System.Data.OracleClient"/> </connectionStrings> Data Source=orcl 数据库名 User ID=yaozc 用户名 Password=yaozc 密码