Arrays interacting with DB

Results 1 to 2 of 2

Thread: Arrays interacting with DB

  1. #1
    Join Date
    Dec 1969

    Default Arrays interacting with DB

    I have an array with 30 integer values in it (index 0 - 29). ANd I have an access DB recordset with a field that has 30 records of integer values (along w/ an autonumber field ID 1-30). <BR><BR>What I would like to do is go through and compare the first element of my array against the value I have written in my first record of my field. Compare the second value in the array against the second record in my db...etc. If they are the same, just skip it. If they are differnt, I want to write the value of my array into the db. <BR><BR>What is the most efficient way to do this? Rather than updateing my db everytime a differnt value is found, can i possibly store the differing values somewhere else and write them in at one time? Someone please help! psuedo/actual code would be most appreciated! THank you all!

  2. #2
    Join Date
    Dec 1969

    Default RE: Arrays interacting with DB

    Sadly the only feasable way is to either loop through the recordset using movenext and using rs.update or use a conn.excute of a simple sql update statement 30 times using where ID = etc. Don&#039;t really need the array for this at all ie instead of filling an array just do this instead unlesss need the array for something else.

Posting Permissions

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