Results 1 to 5 of 5

Thread: store in array and store value in acces table

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Mar 2005
    Posts
    2,586

    store in array and store value in acces table

    I loop "line by line" in a text file and get 5 value for each line.

    For all 5 value i store in a 5 variable, similar:
    value1 in variable1, value2 in variable2, .... ecc

    During the loop i want to append all variable in to an array until the code have read entire text file. Now, i want to save entire value of array, "in one shot only" into an access table based this mode:

    Array value 1 into rs(0), array value 2 into rs(1), value 5 in rs(4) ecc...

    Note:
    I use the tipical Ado Jet connection to Access Table

  2. #2
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: store in array and store value in acces table

    Array value 1 into rs(0), array value 2 into rs(1), value 5 in rs(4) ecc...
    What does this means? Separate records? or separate fields? or separate recordsets?

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  3. #3
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,930

    Re: store in array and store value in acces table

    Please stop posting in the wrong forum... I have told you repeatedly that questions that involve databases do not belong in the 'VB6' forum - Thread moved to 'Database Development' forum

  4. #4

    Thread Starter
    PowerPoster
    Join Date
    Mar 2005
    Posts
    2,586

    Re: store in array and store value in acces table

    Quote Originally Posted by akhileshbc View Post
    What does this means? Separate records? or separate fields? or separate recordsets?
    separate recordsets....YES

  5. #5
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,123

    Re: store in array and store value in acces table

    Why do you even need a recordset? Why not just create an INSERT INTO sql for each record and issue it once you are done with all the records? In sql server we could separate the DMLs using a semi-colon, not sure with Access but you can try it, I think it will work, something like:

    Code:
    INSERT INTO Table (Column1,COlumn2) VALUES('value1','Value2');
    INSERT INTO Table (Column1,COlumn2) VALUES('value3','Value3');
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

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