This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / I am trying to connect with ACCESS using ASP, the following is the code that I wrote, anything wrong with it? Thanks for your helpoption explicit
dim conn, sql
dim mdbfile, strConnString
mdbfile = "/data/download.mdb"
strConnString = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath( mdbfile ) & ";"
set conn = Server.CreateObject ("ADODB.Connection")
conn.Open strConnString
sql = blarblar.....(some sql sentence)
conn.Execute (sql)
-semaphore(扭扭捏捏);
2003-2-4
{338}
(#1020225@0)
-
如果你是用其它公司的hosting,这个联接串应该用该公司提供的连接串的格式来写.因为不同的公司可能用的engin版本不同.如果只是在你自己的机器上用,用ODBC的DSN比较方便可靠.我想可能你不应该把数据库文件放web的虚拟目录上.因为数据库文件必须放在有写权限的目录下.
-extraman(挥天舞地机械手);
2003-2-6
{136}
(#1024487@0)