Hello guys,
I'm a real newbie so sorry that I may ask stupid questions but I'm stuck:
I've been deducting this from other code and I was quite proud of myself for writing this what to my opinion should work. But unfortunately it doesn't :-)
I get the "Page cannot be displayed"-page.
If anyone could help me to clarify for me what I'm doing wrong here, that would be very nice.
Greets,
Cainnech
I'm a real newbie so sorry that I may ask stupid questions but I'm stuck:
Code:
<%
Dim con,sql_update,name,form_id,data_source
form_id = CInt(Request.Form("id"))
data_source = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _ Server.MapPath("employees.mdb")
name = "Select Name From users where id = " & form_id
If _
name == "John" _
Then _
sql_update = "Update users Set status = 'True' where id = " & form_id _
Else _
sql_update = "Update users Set status = 'False' where id = " & form_id _
End If
Set con = Server.CreateObject("ADODB.Connection")
con.Open data_source
con.Execute sql_update
con.Close
Set con = Nothing
Response.Redirect "showall.asp"
%>
I get the "Page cannot be displayed"-page.
If anyone could help me to clarify for me what I'm doing wrong here, that would be very nice.
Greets,
Cainnech
Comment