瑞鲁手机APP下载网_专注推荐好用的手机APP和游戏APP

java 教你快速掌握广东话

快速掌握ASP连接11种数据库的常用语法

人气:1引自:瑞鲁游戏APP

1.Access数据库的DSN-less连接方法:

以下为引用的内容:set adocon=Server.Createobject("adodb.connection")adoconn.Open"Driver={Microsoft Access Driver(*.mdb)};DBQ="& _Server.MapPath("数据库所在路径") 

2.Access OLE DB连接方法:

以下为引用的内容:set adocon=Server.Createobject("adodb.connection")adocon.open"Provider=Microsoft.Jet.OLEDB.4.0;"& _"Data Source=" & Server.MapPath("数据库所在路径") 

3.SQL server连接方法:

以下为引用的内容:set adocon=server.createobject("adodb.recordset")adocon.Open"Driver={SQL Server};Server=(Local);UID=***;PWD=***;"& _"database=数据库名 

4.SQL server OLE DB连接方法:

以下为引用的内容:set adocon=Server.Createobject("adodb.connection")adocon.open"provider=SQLOLEDB.1;Data Source=RITANT4;"& _"user ID=***;Password=***;"& _"inital Catalog=数据库名" 

5.Oracle 连接方法:

以下为引用的内容:set adocon=Server.Createobject("adodb.connection")adocon.open"Driver={microsoft odbc for oracle};server=oraclesever.world;uid=admin;pwd=pass;" 

6.Oracle OLE DB 连接方法:

以下为引用的内容:set adocon=Server.Createobject("adodb.connection")adocon.open"Provider=OraOLEDB.Oracle;data source=dbname;user id=admin;password=pass;" 

7.dBase 连接方法:

以下为引用的内容:

set adocon=Server.Createobject("adodb.connection")adocon.open"Driver={microsoft dbase driver(*.dbf)};driverid=277;dbq=--;"   8.mySQL 连接方法:

以下为引用的内容:set adocon=Server.Createobject("adodb.connection")adocon.open"Driver={mysql};database=yourdatabase;uid=username;pwd=yourpassword;option=16386;" 

9.Visual Foxpro 连接方法:

以下为引用的内容:set adocon=Server.Createobject("adodb.connection")adocon.open"Driver={microsoft Visual Foxpro driver};sourcetype=DBC;sourceDB=*.dbc;Exclusive=No;" 

10.MS text 连接方法:

以下为引用的内容:set adocon=Server.Createobject("adodb.connection")adocon.open"Driver={microsoft text driver(*.txt; *.csv)};dbq=-----;"&_"extensions=asc,csv,tab,txt;Persist SecurityInfo=false;" 

11.MS text OLE DB 连接方法:

以下为引用的内容:set adocon=Server.Createobject("adodb.connection")adocon.open"Provider=microsof.jet.oledb.4.0;data source=your_path;"&_"Extended Properties'text;FMT=Delimited'" 

专题文集:ASP 学院 ASP|数据库
引用标题:《java 教你快速掌握广东话》
来源地址:https://www.sdruilu.cn/index.php/news/tpart-51720.html