Results 1 to 2 of 2

Thread: This works but .... (Resolved Thanks)

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2001
    Location
    San Diego, CA
    Posts
    159

    This works but .... (Resolved Thanks)

    Back the the ADODB recordset..Thanks to those who advised me to add the adLockOptimistic so I could actually add records to the record set and subsequently the table. The following code work just fine.

    sqlTest = "Select * from test"
    rstTest.Open sqlTest, strFile, adOpenDynamic, adLockOptimistic
    rstTest.AddNew
    For n = 0 To 7
    rstTest(n) = Me.txtTest(n).Text
    Next n
    rstTest.Update

    However, the following does not work...

    rstTest(4) = me.txtTest(4).text
    rstTest.Update

    Do I need to put the recordset into some sort of "edit" mode before trying to update it?
    Last edited by CliffPhilip; Feb 10th, 2003 at 10:19 AM.
    ttfn
    Kicker

  2. #2
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385
    CliffPhilip,

    I do not use this kind of editing often (I use SQL), but when I did I opened the recordset using:


    adLockPessimistic

Posting Permissions

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



Click Here to Expand Forum to Full Width