jijk5
01-03-2006, 08:33 AM
Hi,
well, i have a problem connecting to an access database, that made me so desperate, cuz i tried many ways, but all failed..
first, i'm not a professional. just a beginer..
i made a multiple choice test, which get the data from a database.
My database name is "VBQUIZ1.mdb"
and i tested it by IIS on my computer, and oh yeah, it works :) , now the time to publish it on the site, but oh no, it doesn't work :eek: :( .
i tried many way to connect to the database, with DSN or without DSN, or using physical path.
but all the time i recieved many error messages.
The ODBC DSN that i attached the database to it, its name "VBQUIZ1123"
What shall i do??
bellow the code that i recently tried, i tried before many many ways, but that was months ago, ( oh i have the problem since a long time ago :rolleyes: )
<% Set connectionToDatabase=Server.CreateObject("ADODB.Connection")
connectionToDatabase.ConnectionTimeout=60
connectionToDatabase.Open"DSN=DSNname" %>
and thats the code for me
<% Set connectionToDatabase=Server.CreateObject("ADODB.Connection")
connectionToDatabase.ConnectionTimeout=60
connectionToDatabase.Open"DSN=VBQUIZ1123" %>
and thats the error
Microsoft VBScript runtime error '800a01a8'
Object required: '[undefined]'
/ReportM2/UG73/VBQUIZTF.ASP, line 53
i changed the Server name from "Server" to the the host name server but still same error.
also my database size is 3.6 mb.
Is there some thing wrong with the code?
Can any one help me please..
well, i have a problem connecting to an access database, that made me so desperate, cuz i tried many ways, but all failed..
first, i'm not a professional. just a beginer..
i made a multiple choice test, which get the data from a database.
My database name is "VBQUIZ1.mdb"
and i tested it by IIS on my computer, and oh yeah, it works :) , now the time to publish it on the site, but oh no, it doesn't work :eek: :( .
i tried many way to connect to the database, with DSN or without DSN, or using physical path.
but all the time i recieved many error messages.
The ODBC DSN that i attached the database to it, its name "VBQUIZ1123"
What shall i do??
bellow the code that i recently tried, i tried before many many ways, but that was months ago, ( oh i have the problem since a long time ago :rolleyes: )
<% Set connectionToDatabase=Server.CreateObject("ADODB.Connection")
connectionToDatabase.ConnectionTimeout=60
connectionToDatabase.Open"DSN=DSNname" %>
and thats the code for me
<% Set connectionToDatabase=Server.CreateObject("ADODB.Connection")
connectionToDatabase.ConnectionTimeout=60
connectionToDatabase.Open"DSN=VBQUIZ1123" %>
and thats the error
Microsoft VBScript runtime error '800a01a8'
Object required: '[undefined]'
/ReportM2/UG73/VBQUIZTF.ASP, line 53
i changed the Server name from "Server" to the the host name server but still same error.
also my database size is 3.6 mb.
Is there some thing wrong with the code?
Can any one help me please..