Results 1 to 3 of 3

Thread: ADO Data Bound Grid

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    5

    Red face

    I know I shouldn't duplicate the primary keys, but I still need to duplicate a record, then edit one or two fields (the record contains about 150 fields). Right now I'm using the .Addnew method, and then I have to give each field a value one by one ! This gets a bit tedious, there must be an easier way !

  2. #2
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Dunmow,Essex,England
    Posts
    898

    Lightbulb Updating the database

    Hi,

    You could try using the clone method this will copy the original data, then change the individual field elements before saving. The other method that you may also find useful is the BatchUpdate method if you want to post records back after making changes to more than one record.


  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    5

    Cool Yeah !!

    Hey Bill, thanx for the response. I'm using the .Clone method at the moment to duplicate the records, the best I can do looks something like this :

    With AdoDataBurr.Recordset
    Set AdoTemp.Recordset = .Clone
    AdoTemp.Recordset.AbsolutePosition = .AbsolutePosition
    .AddNew
    !Sched = AdoTemp.Recordset!Sched
    !InCID AdoTemp.Recordset!InCID
    etc,
    etc,
    etc
    .Update
    End With

    Is there a better way?


    The other problem is how to insert a record into another table. The older drivers you could say something like:

    DiskDB.Execute ("Insert into Table1 Select * from Table2")

    How to I do this with ADO controls?



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