Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8536513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:41:06+00:00 2026-06-11T10:41:06+00:00

Hello I have a Datatable and with 36 columns and about 112000 records and

  • 0

Hello I have a Datatable and with 36 columns and about 112000 records and an empty mdb file, what is the best way to add that table to the empty mdb database?

do i have to use the SQL Command CREATE TABLE and add each column manually to the created Datatable then use the SQL insert command?

is there something like SqlBulkCopy that can be used for this task?
note the Datatable is created at runtime and never been in a database most of the data is taken from XML files

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T10:41:07+00:00Added an answer on June 11, 2026 at 10:41 am

    I think the best way is to use OleDBAdapter class. You need to first build your database before you proceed this process. As it is needed by the OleDBAdapter. If you recall, you use the DataAdapter’s Fill() method to read the contents of a table in a database and fill our locally-cached DataTable object.

    There are 3 steps to saving data in ADO.Net:

    • Get a locally cached copy of the data with the Fill() method
    • Write code (or use a control) that makes changes to the locally cached copy
    • Save the changes back to the underlying database with the Update() method

    Here’s the code,

    Using conn As New OleDBConnection("connectionString Here")
        Using comm As New OleDBCommand()
            With comm
                .Connection = conn
                .CommandType = CommandType.CommandText
                .CommandText = "SELECT * FROM youTableName"
            End With
            Using adapter As New OleDBDataAdapter(comm)
                Dim _dataTable As New DataTable()
                adapter.Fill(_dataTable)
    
                'add you records here  '
                ' preferably by using loop '
                Dim _dataRow As DataRow
                _dataRow = _dataTable.NewRow()
                _dataRow("colNameA") = "valueA"
                _dataRow("colNameB") = "valueB"
                '........ '
                _dataTable.Rows.Add(_dataRow)
    
                Dim dt_changes As DataTable
                dt_changes = _dataTable.Changes()
                If Not IsNothing(dt_changes) Then
                    Using commBuild As OleDbCommandBuilder(adapter)
                        Dim rowCount as Integer = adapter.Update(dt_changes)
                        MsgBox(rowCount  & " updated")
                    End Using
                End If
            End Using
        End Using
    End Using
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello I have a datatable that I would like to filter with a single
hello I have this code that use to sort a datatable. Dim sortingIndex As
Hello I have one question about using genetic in correct way. please look at
hello i have this question i was trying to find a way to call
hello I have my code that connects to my ftp server $conn_id = ftp_connect($ftp_server);
Hello I have a Dynamic DataTable Created at runtime. The Setup is like so
Hello I have a problem with fetching required rows from MySQL table correctly within
Hello i have class for download file. He work as expected except for remove
Hello I have to add elements to my list and I notice if I
Hello I have the code below that for some reason is not working: I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.