Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_ado_rds thread: cannot update exist record


Message #1 by "Tien-tien Lai" <tlai@b...> on Mon, 11 Jun 2001 19:50:25
Hello all,



   I'm trying to update several fields within one record.  However, for 

some reason, I keep on getting this error:



Error Type:

Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)

Multiple-step OLE DB operation generated errors. Check each OLE DB status 

value, if available. No work was done.



if you can help,that would be great!  is there another way for me to 

update a record?







<!------here's my code---->



<!-- METADATA TYPE="TypeLib" FILE="C:\Program Files\Common 

Files\system\ado\msado15.dll" --> 

<%

   Set conn = Server.CreateObject("ADODB.Connection")

   conn.open "mysql","sa","sa"



'uid and email together are keys

  SQLQuery = "SELECT * FROM survey WHERE uid=" &uid& " and email='"      

&mail& "';"



  Set rs = Server.CreateObject("ADODB.Recordset")

  response.write(SQLQuery)

   rs2.Open SQLQuery,conn,adOpenStatic,adLockPessimistic,adCmdTable





  if rs.eof then

  response.write("error:no such record")

  else



  rs("clientConn") =  client

  rs("construction") =  constr

  rs("consultation") =  consul



  rs.Update

   end if





<!--end if file-->




  Return to Index