Re: insert into error



Jim in Arizona wrote:
> Granted, I'm a bit rusty with this stuff but looking at everything
> else i've done for an example, I see no errors but I'm still getting
> one.
> Here is the error I'm getting in IE:
>
> Error Type:
> Microsoft JET Database Engine (0x80040E14)
> Syntax error in INSERT INTO statement.
> /nogo.asp, line 19
>
> I've done a response.write with the SQL statement and I get this
> (wordwrap):
>
> INSERT INTO master (UserName, WorkstationIP, datetime) VALUES
> ('domain\jim','192.168.1.3','5/10/2005 2:08:54 PM')
>

Date/Time literals need to be delimited with #'s in JetSQL.

Of course, it's silly to be forced to worry about delimiters (let alone
unsafe) ...

http://www.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=e6lLVvOcDHA.1204%40TK2MSFTNGP12.phx.gbl


or, if you don't want to deal with saved queries:

http://groups-beta.google.com/group/microsoft.public.inetserver.asp.db/msg/72e36562fee7804e

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


.



Relevant Pages

  • Re: Error while executing a sql statement via connection string.
    ... I wonder if it's a unicode issue ... ... > Microsoft JET Database Engine ... > THE FOLLOWING IS THE CODE OF THE SQL STATEMENT GETTING UPDATED. ... Please reply to the newsgroup. ...
    (microsoft.public.inetserver.asp.db)
  • Re: Need Help with this SQL Expression to Access Database Records
    ... > Microsoft JET Database Engine error '80040e14' ... District02FROM MASTER ... The result of the response.write should be a sql statement that can be ... Please reply to the newsgroup. ...
    (microsoft.public.scripting.vbscript)
  • Re: Error in dynamic sql: Data type mismatch in criteria
    ... > The sql statement is built as a part of asp login verification, ... means you MUST NOT delimit the data by putting quotes around it. ... In Access, you can use double quotes for your delimiters, so this will work ... browser window into the SQL View of an Access Query Builder and run without ...
    (microsoft.public.inetserver.asp.general)
  • Re: Cant Add Fields to Form
    ... Look at the Record Source property of the form. ... the SQL statement or the saved query before they will be visible to the ... "Jeff Miller" wrote in message ... Hoping I'm posting to the right newsgroup. ...
    (microsoft.public.access.forms)
  • Re: Retriving data from DB
    ... rsRecordset("Name"), which name would I get from the recordset, the first ... > the fields in your table and generate this sql statement for you (and even ... > post to an Access newsgroup for help. ... >> tblSchedule and tlbScheduleAdd ...
    (microsoft.public.inetserver.asp.db)