An error occured while creating object WScript
Hi all.
I am developing an ASP website and using MS Access as database.
I keep getting this error:
An error occured while creating object WScript
when I click at hyperlink at my web menu. Not to only one hyperlink, but it happens to all the hyperlinks created at my website.
Why this error occured? Hope, somebody can explain.
Thanks in advance.
Re: An error occured while creating object WScript
Do you have an example of the code where this is happening?
A basic example of creating the Database Object and Closing it would be like this .. where conn is the connection object ..
so to open and run an SQL statement you would do like this
VB Code:
OpenDBConnection Server.Mappath("./MyFile.mdb"), conn
Set rs = conn.Execute("SELECT * FROM myTable;")
If Not rs.EOF then
... do some code
End If
CloseDBConnection conn
VB Code:
'// OPEN DATABASE CONNECTION
SUB OpenDBConnection(dbfile, conn)
set conn = server.createobject("ADODB.Connection")
conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & dbfile
END SUB
'// CLOSE DATABASE CONNECTION
SUB CloseDBConnection(conn)
conn.close
set conn=nothing
END SUB