Bad INSERT INTO command???
From: Noozer (dont.spam_at_me.here)
Date: 01/18/05
- Next message: Lynn Trapp: "Re: unknown function name in query expression"
- Previous message: domenico: "Strange Problem with query"
- Next in thread: Noozer: "Re: Bad INSERT INTO command???"
- Reply: Noozer: "Re: Bad INSERT INTO command???"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 18 Jan 2005 09:59:33 -0700
I have an ASP page that is trying to add a record to an MS Access database,
but I'm getting a MS Jet error 80040e14. Syntax error in INSERT INTO
statement.
The INSERT command I'm using is:
INSERT INTO Calls (Who, When) VALUES ('10.0.94.11', #1/18/2005 9:56:37
AM#)
..where "Who" is a 16 character text field and When is a General format
Date/Time field. The only other field in the Calls table is "CallID" with is
an autonumber.
Code I'm using is:
'Create database objects
set adoCon = server.CreateObject("ADODB.Connection")
set rsSet = server.CreateObject("ADODB.Recordset")
'Connect to database
adoCon.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
Server.MapPath("Calls.mdb")
'Add Call to database
strSQL="INSERT INTO Calls (Who, When) VALUES ('" & AgentIP & "', #" & When
& "#);"
rsSet.open strSQL, adoCon
...any idea's why this is happening? I believe it has something to do with
the date, but I can't figure it out.
Thx!
- Next message: Lynn Trapp: "Re: unknown function name in query expression"
- Previous message: domenico: "Strange Problem with query"
- Next in thread: Noozer: "Re: Bad INSERT INTO command???"
- Reply: Noozer: "Re: Bad INSERT INTO command???"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|