源码
资讯
  当前位置:源码网网络学院网络编程ASP教程 → ASP连接Access数据库
特别推荐
热点TOP10
本周软件排行
最近更新软件
ASP连接Access数据库
日期:2006年3月27日 作者: 人气: 查看: [大字体 中字体 小字体]
1.
set dbconnection=Server.CREATEOBJECT("ADODB.CONNECTION")
DBPath = Server.MapPath("customer.mdb")
dbconnection.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
    SQL="select * from auth where id="" & user_id &"""
    SET uplist=dbconnection.EXECUTE(SQL)



2.
    set dbconnection=Server.CreateObject("ADODB.Connection")
    DBPath = Server.MapPath("customer.mdb")
    dbconnection.Open "provider=microsoft.jet.oledb.4.0;data source="&dbpath
    SQL="select * from auth where id="" & user_id &"""
    SET uplist=dbconnection.EXECUTE(SQL)



3.
    DBPath = Server.MapPath("customer.mdb")
    set session("rs")=Server.CreateObject("ADODB.Recordset")
"   rs=Server.CreateObject("ADODB.Recordset")
    connstr="provider=microsoft.jet.oledb.4.0;data source="&dbpath
    SQL="select * from auth where id="" & user_id &"""
    session("rs").Open sql,connstr,1,3



4.
建odbc源xxx
set conn=server.createobject("Adodb.connection")
conn.open "DSN=xxx;UID=;PWD=;Database=customer

(出处:源码网)

百度搜索 Google搜索 雅虎搜索 我要投稿
相关文章: 相关软件: