Get a 500 Internal server error when i try to make a dsn-less connection via asp to my hosted database. Can't figure out where the problem is Please help. I tried to troubleshoot the problem using a basic page that submits a hard coded value into the database to keep things simple. Thats the code i've provided here. Please point out where i'm going wrong.
The path to the database was provided by my web host
I've also tried with the alternative path ../db/ozone.mdb, but no results
<%@ Language="VBScript" %>
<% Option Explicit %>
<title>ASP for database</title>
Dim vdiagnosis, diagnosis, sConnString, connection, sSQL
diagnosis = "fever"
vdiagnosis = diagnosis
'declare SQL statement that will query the database
sSQL = "INSERT into patient (diagnosis) values ('" & vdiagnosis & "')"
'define the connection string, specify database driver and the location of database
sConnString="PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Server.MapPath("D:\inetpub\vhosts\ozonekb.com\httpdocs\db\ozone.mdb")
'create an ADO connection object
Set connection = Server.CreateObject("ADODB.Connection")
'Open the connection to the database
'execute the SQL
response.write "The form information was inserted successfully."
'Done. Close the connection object
Set connection = Nothing