Freon22
01-21-2003, 09:28 AM
You guys saved me before and I am hoping that you will again. Here is my problem. I am trying to input infor, into a data base (access 2000) and when I run the page I get this. I have reworked this page and reworked it but I still get the same thing. I sure am hoping you guys will be able to see were I have mess up. And again thanks for looking this over.
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
/project/addfreon.asp, line 36
Here is a copy of my page.
<%@ Language=VBScript %>
<% Option Explicit %>
<!--#include virtual="/adovbs.inc"-->
<!--#include file="script/is_user_authorised.inc"-->
<html>
<head>
<title>Authorised User</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="currier.css">
</head>
<body>
<%
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString= "Driver={Microsoft AccessDriver (*.mdb)};" & _
"DBQ=" & Server.MapPath("db/dbfreon.mdb")
objConn.Open
'Open Recordset-->
Dim objRS
Set objRS = Server.CreateObject ("ADODB.Recordset")
objRS.Open "tblpurchase", objConn, , adLockOptimistic, adCmdTable
'Add new record to database
objRS.AddNew
objRS("company") = Request.Form("Company")
objRS("date") = Request.Form("Date")
objRS("purchased") = Request.Form("Purchased")
objRS("type") = Request.Form("Type")
objRS("invoice") = Request.Form("Invoice")
objRS("notes") = Request.Form("Notes")
objRS.Update <----This is line 36
objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
%>
<p><p>
<center><H1>You have added the new Freon record successfully.</H1></center>
<META HTTP-EQUIV="refresh" content="3;URL=freon.asp">
</body>
</html>
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
/project/addfreon.asp, line 36
Here is a copy of my page.
<%@ Language=VBScript %>
<% Option Explicit %>
<!--#include virtual="/adovbs.inc"-->
<!--#include file="script/is_user_authorised.inc"-->
<html>
<head>
<title>Authorised User</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="currier.css">
</head>
<body>
<%
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString= "Driver={Microsoft AccessDriver (*.mdb)};" & _
"DBQ=" & Server.MapPath("db/dbfreon.mdb")
objConn.Open
'Open Recordset-->
Dim objRS
Set objRS = Server.CreateObject ("ADODB.Recordset")
objRS.Open "tblpurchase", objConn, , adLockOptimistic, adCmdTable
'Add new record to database
objRS.AddNew
objRS("company") = Request.Form("Company")
objRS("date") = Request.Form("Date")
objRS("purchased") = Request.Form("Purchased")
objRS("type") = Request.Form("Type")
objRS("invoice") = Request.Form("Invoice")
objRS("notes") = Request.Form("Notes")
objRS.Update <----This is line 36
objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
%>
<p><p>
<center><H1>You have added the new Freon record successfully.</H1></center>
<META HTTP-EQUIV="refresh" content="3;URL=freon.asp">
</body>
</html>