p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

proasp_codeclinic thread: SQL update sporadic problem


Message #1 by "Nadia Hamza" <hamzan@h...> on Thu, 19 Jul 2001 19:42:38
Hi,

I am trying to update a record in Access.  It works fine most of the time 
but I recently got one record where it didn't update at all and didn't 
provide an error message.

The code I'm using is: 

   Set objRec = Server.CreateObject ("ADODB.Recordset")
   sql = "UPDATE " & filename & " SET OrderID = " & OrderIDStr & ", 
Success = '" & outcome &_
         "', TotalCyberCash = '" & fee & "', ErrorCode = '" & errorcode &_
         "', ReferenceCode = '" & refcode & "', TransactionDate = '" & 
saledate &_
         "' WHERE RegistrationID = " & recordnumber & ";"
   objRec.Open sql, strConnect, adOpenStatic, _
   adLockReadOnly, adCmdText 

I've tested Access out with 4 simultaneous hits on the database and it 
worked.  I need to come up with a solution that will update the record 
ever time not 90+% of the time.  Or I need a suggestion for a roundabout 
way of making sure it works.  Thanks!

Nadia


  Return to Index