HI Need Some Help Quick - Probably VERY Simple

Results 1 to 3 of 3

Thread: HI Need Some Help Quick - Probably VERY Simple

  1. #1
    Join Date
    Dec 1969

    Default HI Need Some Help Quick - Probably VERY Simple

    Hi!<BR><BR>Can anyone tell me what is wrong with the code that follows. I get a syntax error on the line that executes the SQL. <BR><BR>I need this quickly!<BR><BR>Many thanks if you can help at all!<BR><BR>Edwin<BR><BR><BR>&#039; THIS IS THE CODE <BR><BR>dbname="db/forum.mdb"<BR>set conntemp=server.createobject("adodb.connection")<B R>cnpath="DBQ=" & server.mappath(dbname)<BR>conntemp.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & cnpath<BR><BR>SQLTemp="insert into forum (word,title,comment,date,user) VALUES (&#039;" & request("word") & "&#039;,&#039;" & request("title") & "&#039;,&#039;" & request("comment") & "&#039;,&#039;" & Date & " - " & Time & "&#039;,&#039;" & request.cookies("Nick") & "&#039;)"<BR><BR>conntemp.execute(SQLTemp) &#039; This is wherer the error occurs<BR><BR>---- Many thanks again, if you can help! ----

  2. #2
    Join Date
    Dec 1969

    Default RE: HI Need Some Help Quick - Probably VERY Simple

    I would make sure you are recieving all the values.<BR>Put this above the SQL.<BR><BR>&#060;% Response.Write request("word") &"[add line break]"_<BR>& request("title") &"[add line break]"_<BR>& request("comment") &"[add line break]"_<BR>& Date & " - " & Time &"[add line break]"_<BR>& request.cookies("Nick") &"[add line break]"<BR><BR>Response.End &#039;Stop before executing SQL<BR>%&#062;<BR><BR>Make a value is getting lost.<BR>Just an idea.<BR>

  3. #3
    Join Date
    Dec 1969

    Default ASPFAQs, category Databases, Errors

    The link to the ASPFAQs is at the top right corner of most every page on this site, including the one you are reading right now.<BR><BR>Hint: Look for Access and "DateTime" (or Date/Time).<BR><BR>Second hint: You don&#039;t use &#039;...&#039; around literal datetime values in Access SQL.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts