Jump to content

Error in update


salman.pirani

Recommended Posts

hello dear, am executing this query i dnt know why its nt working

<%set conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open "c:/webdata/sxsheet2.mdb"cid=Session("a")if cid="" thenset rs=Server.CreateObject("ADODB.Recordset")rs.open "SELECT * FROM tsf_form WHERE empid='" & cid & "'",connelsesql="UPDATE tsf_form SET "  sql=sql & "Funded_by1='" & Request.Form("Funded_by1") & "',"  sql=sql & " WHERE empid=" & cid & ""  on error resume next  conn.Execute sql  if err<>0 then    response.write("No update permissions!")  else    response.write("Record " & cid & " was updated!")  end ifend ifconn.close%>

Link to comment
Share on other sites

i tried this but still not working sir plz help

<%set conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open "c:/webdata/sxsheet2.mdb"cid=Session("a")if Request.Form("des_exp1")="" thenset rs=Server.CreateObject("ADODB.Recordset")rs.open "SELECT * FROM tsf_form WHERE empid='" & cid & "'",connelsesql="UPDATE tsf_form SET "  sql=sql & "des_exp1='" & Request.Form("des_exp1") & "',"    sql=sql & "amount1='" & Request.Form("amount1") & "'"  sql=sql & " WHERE empid=" & cid & ""  on error resume next  conn.Execute sql  if err<>0 then    response.write("No update permissions!")  else    response.write("Record " & cid & " was updated!")  end ifend ifconn.close%>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...