Link to home
Start Free TrialLog in
Avatar of imjusthere
imjusthere

asked on

sql noob question

Can someone tell me what I've done wrong here?  There is something wrong with my where clause.  If i write the value in idnumber manually everything works fine.  But when i try to assign it as a variable it won't work.

<%
sql ="UPDATE bc SET bc_approved = 1, bc_name='"&name&"', bc_title='"&title&"', bc_address1='"&address&"', bc_address2='"&address2&"', bc_cell='"&direct&"',bc_phone2='"&tollfree&"',bc_phone='"&office&"',bc_fax='"&fax&"',bc_license='"&lic&"',bc_email='"&email&"',bc_spanish='"&spanish&"',bc_quantity='"&quantity&"',bc_backer='"&backer&"' WHERE bc_id = '"&idnumber&"'"
%>
ASKER CERTIFIED SOLUTION
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
that actually shouldn't matter (though I realize that sometimes it does....)

probably should make sure the value is actually populated by something...

response.write(idnumber)

while you're at it, you could also convert it to an integer

cint(idnumber)