简单一言

ASP连接各类数据库的方式

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
喜欢就支持一下吧
点赞12赞赏 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容