Try putting the memo field last..

Bob Filipiak
A question not asked
  is a lost opportunity to learn.
----- Original Message ----- 
From: "Paul Robinson" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, April 12, 2005 3:16 PM
Subject: Re: [AspClassicAnyQuestionIsOk] Syntax error in INSERT INTO 
statement


>
> Bob,
> The SQL string that I detail at the start of my post is generated by a
> Response.write strSQL statement
> And it is that same SQL that I tested in Access QBE and it worked
>
> Paul
>
> ----- Original Message ----- 
> From: "BobFilipiak" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Tuesday, April 12, 2005 8:01 PM
> Subject: Re: [AspClassicAnyQuestionIsOk] Syntax error in INSERT INTO
> statement
>
>
>>
>> Try commenting out your objConnExecute(strSQL) and add this in it place:
>>
>> response.write("[" & strSQL & "]")
>>
>> this will display what is actually being used.
>>
>>
>> Bob Filipiak
>> A question not asked
>>   is a lost opportunity to learn.
>> ----- Original Message ----- 
>> From: "Paul Robinson" <[EMAIL PROTECTED]>
>> To: <[email protected]>
>> Sent: Tuesday, April 12, 2005 1:22 PM
>> Subject: [AspClassicAnyQuestionIsOk] Syntax error in INSERT INTO 
>> statement
>>
>>
>> >
>> > Can anyone spot the obvious that I am missing?
>> >
>> > I am trying to append data into an Access database and I keep getting
> the
>> > error message 'Syntax error in INSERT INTO statement'
>> > I have worked through the SQL, one item at a time removing each and
> trying
>> > to find the offending item. However, I keep getting the error message.
>> > Yet, when I copy the SQL straight over to Acces and paste it into a
> query,
>> > it works.
>> > I am assuming then, that the Jet engine is objecting to something,
> though
>> > for the life of me, after a hard day's work, I cannot see what.
>> > The full SQL is
>> >
>> > INSERT INTO tblCADreSchedule(autoCadFk, oldDate, oldTime, newDate,
>> > newTime, fldComments, user,datWhen) VALUES (1323,#8-Apr-2005#,#15:00#,
>> > #12-Apr-2005#,#18:00#,'were ','robinsop',#12-Apr-2005#)
>> >
>> > autoCadFk is a number field
>> > oldDate, oldTime, newDate, newTime, datWhen are date/time  fields
>> > fldComments is a memo field
>> > user is a text field
>> >
>> > My ASP code is :
>> >
>> > strConnect = "Provider=Microsoft.Jet.OLEDB.4.0; Data
>> > Source=d:\Projects.mdb;"
>> >
>> > Set objConn = server.CreateObject("ADODB.Connection")
>> > objConn.open strConnect
>> >
>> > strSQL = "INSERT INTO tblCADreSchedule(autoCadFk, " & _
>> > 
>> > "oldDate,
> "
>> > & _
>> > 
>> > "oldTime,
> "
>> > & _
>> > 
>> > "newDate,
> "
>> > & _
>> > 
>> > "newTime,
> "
>> > & _
>> >
>> > "fldComments, " & _
>> >                                                                "user, "
> &
>> > _
>> >
> "datWhen)"
>> > & _
>> >                                " VALUES                 (" & iCadReq &
>> > ",#" & _
>> >
>> > FormatLoadDate(datReqDate,3) & "#,#" & _
>> >
>> > FormatDateTime(datReqTime,4) & "#, #" & _
>> >
>> > Request.Form("RequestReplyDate") & "#,#" & _
>> >
>> > Request.form("cboTime") & "#,'" & _
>> >
>> > Request.Form("txtComments") & "','" & _
>> >                                                                strUser 
>> > &
>> > "',#" & _ datToday & "#)"
>> >
>> > objConn.Execute (strSQL)
>> >
>> >
>> >
>> > [Non-text portions of this message have been removed]
>> >
>> >
>> >
>> >
>> > Yahoo! Groups Links
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>>
>>
>>
>>
>>
>> Yahoo! Groups Links
>>
>>
>>
>>
>>
>>
>>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
> 




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to