ASP连接各类数据库的方式
Access
ConnStr = “Provider=Microsoft.JET.OLEDB.4.0;Data Source=” & Server.MapPath(Path) & “;Jet OLEDB:Database Password=” & Password & “;”
Mssql
ConnStr = “Provider=Sqloledb;Data Source=” & DbIP & “,” & DbPort & “;Initial Catalog=” & DbName & “;Persist Security Info=True;User ID=” & DbUid & “;Password=” & DbPwd & “;Connect Timeout=900;”
Sqlite
ConnStr = “Driver={SQLite3 ODBC Driver};Database=” & Server.MapPath(Path) & “;”
Mysql
ConnStr = “Driver={Mysql ODBC 5.3 Unicode Driver};Server=” & DbIP & “;Database=” & DbName & “;Uid=” & DbUid & “;Password=” & DbPwd & “;Port=” & DbPort & “;”
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
暂无评论内容