Pro & Cons of Update

Results 1 to 2 of 2

Thread: Pro & Cons of Update

  1. #1
    Join Date
    Dec 1969

    Default Pro & Cons of Update

    I know there are 2 method of updating the database. <BR>I need to know the cons and pros of each. <BR><BR>First method: <BR>set recAddNewCode = server.CreateObject("ADODB.RECORDSET") <BR>recAddNewCode.Fields("AR_PER5") = AR_PER5 <BR>recAddNewCode.Update <BR>recAddNewCode.Close <BR>set recAddNewCode = nothing <BR><BR>Second Method: <BR>buffer22="Update LPERSON Set NOTIFY1 = &#039; &#039;where EMP_NO = &#039;"&objRs21("EMP_NO"))&"&#039;" <BR>Set objRs22 = conn.Execute(buffer22) <BR><BR>Thanks! <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Pro & Cons of Update

    The way you do it the second method is not much faster, but when it&#039;s a UPDATE (not returning records) you could also do:<BR><BR>conn.Execute(buffer22) (without the SET objRs22=)<BR><BR>this saves the overhead of the recordset object.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts