查看: 120|回复: 2

[其他分类] ASP连接各类数据库的方式

[复制链接]
天下第一 发表于 2024-11-13 19:30:16 | 显示全部楼层 |阅读模式
ASP连接各类数据库的方式

Access

  1. ConnStr = "Provider=Microsoft.JET.OLEDB.4.0;Data Source=" & Server.MapPath(Path) & ";Jet OLEDB:Database Password=" & Password & ";"
复制代码

Mssql

  1. ConnStr = "Provider=Sqloledb;Data Source=" & DbIP & "," & DbPort & ";Initial Catalog=" & DbName & ";Persist Security Info=True;User ID=" & DbUid & ";Password=" & DbPwd & ";Connect Timeout=900;"
复制代码

Sqlite

  1. ConnStr = "Driver={SQLite3 ODBC Driver};Database=" & Server.MapPath(Path) & ";"
复制代码
Mysql

  1. ConnStr = "Driver={Mysql ODBC 5.3 Unicode Driver};Server=" & DbIP & ";Database=" & DbName & ";Uid=" & DbUid & ";Password=" & DbPwd & ";Port=" & DbPort & ";"
复制代码

评分

1

查看全部评分

一往情僧 发表于 2024-11-14 08:02:51 | 显示全部楼层
这个真的有用,收藏了!
 楼主| 天下第一 发表于 2024-11-14 09:22:41 | 显示全部楼层
一往情僧 发表于 2024-11-14 08:02
这个真的有用,收藏了!

感谢支持啊
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表

在线客服

售前咨询
售后咨询
服务热线
023-58418553
微信公众号