PropertyName1=”Value1″;PropertyName2=”Value2″;PropertyName3=”Value3″;…..
同样,连接字符串必须包含SQL Server实例名称: Data Source=ServerName;
总的来说,数据库的连接字符串分为两种:Windows身份验证和SQL Server身份验证。每种方法都有各自的优缺点。但是遵循的基本规则是一样的
Oracle
“Provider=OraOLEDB.Oracle; Data Source=MyOracleDB; User Id=Username; Password=asdasd; “
MySQL
“DRIVER={MySQL ODBC 3.51 Driver}; SERVER=data.domain.com; PORT=3306; DATABASE=myDatabase; USER=myUsername; PASSWORD=myPassword; OPTION=3; “