|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Syntax error in UPDATE
I don't think my code get to error;
please check the code for me i have found but i can see where error was this is my code UPDATE: if trim(request("Option"))="EditCustomer" then CustomerId = trim(request.form("CustomerId")) strupdate="UPDATE customer SET CustomerId ='"&CustomerId&"',firstname='"&Firstname&"'"&"," strupdate=strupdate&"Lastname ='"&lastname&"',Gender='"&Gender&"'"&"," strupdate=strupdate&"email ='"&email&"',phone='"+phone+"'"&"," strupdate=strupdate&"nation ='"&nation&"',customertype ='"&customertype&"'"&"," strupdate=strupdate&"note='"¬e&"',status='"&statuss&"'" strupdate=strupdate&"WHERE CustomerId ='"+request.QueryString("CustomerId")+"';" 'response.Write(strupdate) Set rs = Conn.execute(strupdate)error line Response.Redirect("ListCustomer.asp") rs.Close Set rs=nothing end if thanks Regards Hoang Phuc |
|
#2
|
|||
|
|||
|
Hi,
Ur code looks fine but u can do one thing. uncomment the response.write statement and comment the next few lines. Then you will get the final query in your browser. Then check whether it is correct. ie if the values from the variables are coming right or not and the spacings between keywords. You can also copy and paste the query into ur database query engine and check if it is generating any error or not. if even that fails you can post the generated query in this forum may be i can help you out. Code:
response.Write(strupdate)
'Set rs = Conn.execute(strupdate)error line
'Response.Redirect("ListCustomer.asp")
'rs.Close
'Set rs=nothing
Happy Programming, Vimal Raj http://techisolutions.blogspot.com Quote:
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > ASP Development > Syntax error in UPDATE |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|