i m getting the error as
Error Type:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/myweb/updat.asp, line 18, column 181
my code is
<% if session("bvuser")="true" then
struser=request("usercode")
stremail=request("email")
strfname=request("fname")
strlname=request("lname")
straddress=request("address")
straddress1=request("address2")
straddress2=request("address3")
strcity=request("city")
strcountry=request("country")
strpassword=request("password")
struser=session("usercode")
dim rsupdat,Conn,sql
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Driver={MySql ODBC 3.51 Driver}; Server=localhost; database=slogin; uid=user; pwd=pass;
option=3;"
set rsupdat=server.createobject("ADODB.connection")
sql="update users1 set email='"+stremail+"' and fname='"+strfname+"' and lname='"+strlname+"' and
address='"+straddress+"' and address1='"+straddress1+"' and address2='"+straddress2"' and city='"+strcity+"' and
country='"+strcountry+"' and password='"+strpassword+"' where usercode='"+struser+"';"
set rsupdat=Conn.execute(sql)
response.write("updat")
else
response.write ("login")
end if
%>
i m trying to upadat the database using mysql. i m learning asp. pls anybody figure out the mistake i have done.i tried so much but i could not figure it out
error is showing on
sql=update users1 set email='"+stremail+"' and fname='"+strfname+"' and lname='"+strlname+"' and
address='"+straddress+"' and address1='"+straddress1+"' and address2='"+straddress2"' and city='"+strcity+"' and
country='"+strcountry+"' and password='"+strpassword+"' where usercode='"+struser+"'