Forum Moderators: open
I have this totally annoying error on my page.
The code is supposed to edit the content of a ACCESS 2000 DB sent in from a normal form.
I get the error:
Expectedend of statement.
Line 25, Column 130. This is the UPDATE statement.
I cannot find the error.
I will post the source code.
<%
Qlink_id=Request.form("Reg_id") & " ";
Qlink_navn=Request.form("Reg_navn") & " ";
Qlink_active=Request.form("Reg_status") & " ";
Qlink_tekst=Request.form("Reg_tekst") & " ";
Qlink_url=Request.form("Reg_url") & " ";
Qlink_beskrivelse=Request.form("Reg_beskrivelse") & " ";
Qlink_tekst2=Request.form("Reg_link_tekst2") & " ";
Qlink_gruppe=Request.form("Reg_gruppe") & " ";
select case Request.Querystring("action")
case "edit":
Qlink_id = request.Form("Reg_id");
EditLink= "update LINK set LINK_NAME=" & trim(Qlink_navn) & ",LINK_ACTIVE='" & Qlink_active & "',LINK_TEXT='" & trim(Qlink_tekst)) & "',LINK_URL='" & trim(Qlink_url) & "',LINK_DESCRIPTION=" & trim(Qlink_beskrivelse) & ",LINK_TEXT_URL=" & trim(Qlink_tekst2) & ",LINK_GROUP='" & Qlink_gruppe & "' where LINK_ID=" & trim(Qlink_id);
'Response.Write(EditLink)
objcon.Execute EditLink, iResult;
'Response.Write("recored modified successfully")
response.Redirect("dsp_Employee.asp");
end select
%>
Got any idea?
My head is stuck in zombie mode it seems.... :(
[edited by: LordAust at 11:49 pm (utc) on April 11, 2004]
To WebJoe and Birdman:
Both good advice, and I have updated my codings with the changes you suggested.
Unfortunately this had no real affect on the error message, which seems to be trying its best to ruin my day. And actually doing a good job at that, may I add.
So the problem remains.
The use of 'case', is in proper format right?
You are incorrect. The proper format for a select statement is:
select case variable
case ...
end select
LordAust-
Have you tried removing all the ";" from the end of each line? I assume you are coding in VBScript, and I think they might be throwing a wrench in things.
You've also got a ":" after your case "edit". This also could be an issue.
-Matt