Jump to content

Error in update


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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...