Results 1 to 5 of 5

Thread: [2.0] Datatable to MS Access

  1. #1

    Thread Starter
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Question [2.0] Datatable to MS Access

    Hi all
    I have datatable and MS Access table, both have same database schema.
    But please tell me that without using loop can I save entire datatable to MS Access table.
    Is that best way of programming?
    Thanks
    Last edited by shakti5385; Apr 3rd, 2008 at 02:02 AM.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2.0] Datatable to MS Access

    Create an OleDbDataAdapter with an appropriate InsertCommand and call its Update method, passing the DataTable as a parameter. Saving bulk data to Access is always done that way. Whether or not the data came form that database in the first place is irrelevant.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Re: [RESOLVED] [2.0] Datatable to MS Access

    Is that best way of programming?

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [RESOLVED] [2.0] Datatable to MS Access

    Using MS Access?

    Use what works for you. Try this out and if it works for you, good. You needn't reinvent the wheel.

  5. #5

    Thread Starter
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Wink Re: [2.0] Datatable to MS Access

    Quote Originally Posted by jmcilhinney
    Create an OleDbDataAdapter with an appropriate InsertCommand and call its Update method, passing the DataTable as a parameter. Saving bulk data to Access is always done that way. Whether or not the data came form that database in the first place is irrelevant.
    Hi JMC can you describe some code

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