Microsoft VBScript compilation error '800a03f6'
Hi i have updated the code thx to happygv and am now getting:
Microsoft VBScript compilation error '800a03f6'
Expected 'End'
/myspace/edit_userloc.asp, line 36
this is almost there but not quite.
the edituser_loc.asp page is:
<%@ LANGUAGE="VBSCRIPT" %>
<% Response.buffer = TRUE %>
<%
if isAdmin then
username = Request.cookies("isLoggedInAs")("username")
town = cstr(Request.form("utown"))
postcode = cstr(Request.form("upostcode"))
alerts = cstr(Request.form("alerts"))
Response.write town & "<br>"
Response.write alerts & "<br>"
Response.write postcode & "<br>"
Response.write username
set racDB = Server.CreateObject("ADODB.Connection")
racDB.Open "rac"
set insertset = Server.CreateObject("ADODB.RecordSet")
insertset.Open "Select count(*) as Cnt from memb_loc where username= '" & username & "'", racdb
Dim UserExist, strsql
UserExist = insertset("Cnt")
insertset.close
set insertset = Nothing
If CInt(UserExist)=0 then
strsql="Insert into memb_loc(username,town,postcode,alerts) Values('" & username & "','" & town & "','" & postcode & "','" & alerts & "')"
response.write strsql
response.end
racdb.Execute(strsql)
Else
strsql="Update memb_loc set town='" & town & "', postcode='" & postcode & "', alerts='" & alerts & "' where username='" & username & "'"
response.write strsql
response.end
racdb.Execute(strsql)
End if
%>
</BODY>
</HTML>
this is going to write the values as well as update the database.
all the variables have values so that all works.....
please help.
steve
|