|
Hello everyone, does anyone have an idea why when I try to exectue this code:
<%
' Declare variables
Dim cnnPasswordTest
' Create ADO Connection object
Set cnnPasswordTest = Server.CreateObject("ADODB.Connection")
cnnPasswordTest.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=contact.mdb;Jet OLEDB: Database Password=dbpass;"
'Receiving values from Form, assign the values entered to variables
Name = Request.Form("Name")
Email = Request.Form("Email")
Company = Request.Form("Company")
Phone = Request.Form("Phone")
'declare SQL statement that will query the database
sSQL = "INSERT into contact_tbl (Name, Email, Company, Phone) values ('" & _
Name & "', '" & Email & "', '" & Company & "', '" & Phone & "')"
connection.execute(sSQL)
response.write "The form information was inserted successfully."
cnnPasswordTest.Close
Set cnnPasswordTest = Nothing
%>
I get this error:
Microsoft JET Database Engine error '80004005'
Could not find file 'C:\winnt\system32\contact.mdb'.
/auetest/inforeq.asp, line 12
Does anyone know why it is trying to search the local computer, rather than the server that the file is on?
Sorry if I am an idiot. It happens.
Thanks,
Alex
Last edited by ucmeicu; 10-30-2006 at 05:29 PM..
|