If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > "WHERE ID=" is being a bugger

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-08-04, 14:59
Coug Coug is offline
Registered User
 
Join Date: Nov 2004
Posts: 2
"WHERE ID=" is being a bugger

Hi there, I am quite confused because after going over my code below for a simple update statement I keep getting the
Code:
ODBC Microsoft Access Driver] Syntax error in string in query expression 'ID=''.
error message.

I can not figure out what I am doing wrong. Below is the sql Query and the response.write code.

Code:
fp_sQry="UPDATE External SET external='" & REQUEST("external") & "', internal='" & REQUEST("internal") & "',eIntern='" & REQUEST("eIntern") & "',iIntern='" & REQUEST("iIntern") & "', title='" & REQUEST("title") & "', company='" & REQUEST("company") & "', contact='" & REQUEST("contact") & "', phone='" & REQUEST("phone") & "', fax='" & REQUEST("fax") & "', email='" & REQUEST("email") & "', listed=#" & REQUEST("listed") & "#, salary='" & REQUEST("salary") & "', closing=#" & REQUEST("closing") & "#, status='" & REQUEST("status") & "', department='" & REQUEST("department") & "', availOpen='" & REQUEST("availOpen") & "', url='" & REQUEST("url") & "', jobDesc='" &REQUEST("jobDesc") & "', status='" & REQUEST("status") & "', qual='" & REQUEST("qual") & "', major='" & REQUEST("major") & "', posTitle='" & REQUEST("posTitle") & "', deadline='" & REQUEST("deadline") & "', termAvail='" & REQUEST("termAvail") & "', apply='" & REQUEST("apply") & "', comp='" & REQUEST("comp") & "', placeHis='" & REQUEST("placeHis") &"' WHERE ID=" & REQUEST("External.ID") &"'"
This is of course all on one line and I can no longer find what may be wrong. The response.write generates the following

Code:
UPDATE External SET external='on', internal='o/> Department:<input type=text name=department value=',eIntern='',iIntern='', title='Yo Mama', company='Albertson College of Idaho', contact='contact', phone='phone', fax='459-5214', email='email@email.com', listed=#12/24/2004#, salary='$35,000', closing=#12/25/2004#, status='Note area ', department='', availOpen='3', url='url.com', jobDesc='Job Description ', status='Note area ', qual='Qualifications', major='Major', posTitle='PosTitle', deadline='10/24/04', termAvail='', apply='How to apply here ', comp='12.00', placeHis='04' WHERE ID='
I can see that it is not getting the ID number passed to it. Is it sending the ID number as a string?

I apologize for the amount of code there, I hope it is not bad form for this forum. I apprecitate any and all help. Thank you very much.
Reply With Quote
  #2 (permalink)  
Old 11-08-04, 16:37
Coug Coug is offline
Registered User
 
Join Date: Nov 2004
Posts: 2
Thumbs up Figured it out

Turns out ID was not getting updated correctly from the previous form. Typo's kill. It's all good now though. Thanks to those who took the time to read.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On