首页 >后端开发 >php教程 >数据库连接范例_PHP教程

数据库连接范例_PHP教程

WBOY
WBOY原创
2016-07-13 17:01:47770浏览

OLE DB Method for SQL
set cnn = server.createobject("ADODB.Connection")
cnn.open "PROVIDER=SQLOLEDB;DATA SOURCE=sqlservername;UID=username;PWD=password;DATABASE=databasename "
%>
DSN Less connection for Access
set cnn = server.createobject("ADODB.Connection")
cnn.open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:anydatabase.mdb"
%>
OLE DB Method for Access
set cnn = server.createobject("ADODB.Connection")
cnn.open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=c:anydatabase.mdb"
%>
File DSN Connection Method for Access
cnn.open "FILEDSN=AccessDSN"
%>

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/631126.htmlTechArticleOLE DB Method for SQL % set cnn = server.createobject(ADODB.Connection) cnn.open PROVIDER=SQLOLEDB;DATA SOURCE=sqlservername;UID=username;PWD=password;DATABASE=databasename % DSN Le...
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn