hi.. I am unable to save data to database.the codes are below..It will give mi an error shown:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x9c Thread 0xa8c DBC 0x2185024 Jet'.
/project/b2/013974H/project/addcust.asp, line 28
<% Option Explicit %>
<%
dim err
dim conn
dim rs
dim strBuffer1,strBuffer2
dim varDatabaseName
dim sql
varDatabaseName="db2.mdb"
On Error Resume Next
rs.close
conn.close
set rs = nothing
set conn = nothing
On Error Goto 0
set err = server.createobject("ADODB.error"
set conn = server.createobject("ADODB.connection"
conn.open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath(varDatabaseName)
set rs = server.createobject("ADODB.recordset"
rs.CursorType = 2
rs.LockType = 3
dim s
s = "Select * from customer"
rs.open s,conn '"customer", conn, adLockOptimistic, ,adCmdTable
rs.AddNew
rs("firstname"=Request.Form("firstname"
rs("lastname"=Request.Form("lastname"
rs("delivery"=Request.Form("delivery"
rs("town"=Request.Form("town"
rs("country"=Request.Form("country"
rs("contact"=Request.Form("contact"
rs("fax"=Request.Form("fax"
rs("email"=Request.Form("email"
rs("credit"=Request.Form("credit"
rs("creditcardnum"=Request.Form("creditcardnum"
rs("expire"=Request.Form("expire"
rs("cardholdername"=Request.Form("cardholdername"
rs.Update
response.write "Saved!"
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
<html>
<head>
<title>customerInformation</title>
</head>
<body>
<h3>This information has been saved.</h3>
</body>
</html>
thx for ur help..
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x9c Thread 0xa8c DBC 0x2185024 Jet'.
/project/b2/013974H/project/addcust.asp, line 28
<% Option Explicit %>
<%
dim err
dim conn
dim rs
dim strBuffer1,strBuffer2
dim varDatabaseName
dim sql
varDatabaseName="db2.mdb"
On Error Resume Next
rs.close
conn.close
set rs = nothing
set conn = nothing
On Error Goto 0
set err = server.createobject("ADODB.error"
set conn = server.createobject("ADODB.connection"
conn.open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath(varDatabaseName)
set rs = server.createobject("ADODB.recordset"
rs.CursorType = 2
rs.LockType = 3
dim s
s = "Select * from customer"
rs.open s,conn '"customer", conn, adLockOptimistic, ,adCmdTable
rs.AddNew
rs("firstname"=Request.Form("firstname"
rs("lastname"=Request.Form("lastname"
rs("delivery"=Request.Form("delivery"
rs("town"=Request.Form("town"
rs("country"=Request.Form("country"
rs("contact"=Request.Form("contact"
rs("fax"=Request.Form("fax"
rs("email"=Request.Form("email"
rs("credit"=Request.Form("credit"
rs("creditcardnum"=Request.Form("creditcardnum"
rs("expire"=Request.Form("expire"
rs("cardholdername"=Request.Form("cardholdername"
rs.Update
response.write "Saved!"
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
<html>
<head>
<title>customerInformation</title>
</head>
<body>
<h3>This information has been saved.</h3>
</body>
</html>
thx for ur help..