2384381190

13590589238

access与sql数据库链接代码

2012-9-13 浏览 1824
ACCESS
on error resume next
set conn=server.createobject("ADODB.CONNECTION")
db="Data/data.mdb"
conn.open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ="&server.mappath(db)
sql="select * from adnim_ad where ad_id=9"
rs.open sql,conn,1,3
response.Write(rs("ad_name"))
SQL
set conn=server.CreateObject("adodb.connection")
conn.provider="sqloledb"
ProvStr ="driver={SQL server};server=(local);uid=sa;pwd=;database=33"
Conn.open ProvStr
set rs=server.createobject("adodb.recordset")
sql="select * from adnim_ad where ad_id=9"
rs.open sql,conn,1,3
response.Write(rs("ad_name"))

联系我们

CONTACT US

咨询热线: 地址:广东佛山龙江保涌工业区A101-A103 版权所有:花蝶谷工作室 备案号:桂ICP备11007701号-1 QQ:2384381190 service@huadiegu.net
您是第 位访问者