Hello, here is my code; I have sucessfully made the two connection strings, dataAdapters etc...I also made a dataset which fills into a list box which gives me a visual confirmation that I am receiving data into my dataset from my first database connection string.
The problem is I can't figure out for the life of me how to transfer that data into the other database. I see alot of code out there but none of which I see is viable; i.e. it seems to be "Work arounds".
I got a majority of this figured out; I think; I just need to get the data from one database and put it into another Microsoft Access Database.
Thank you for what ever help any of you can offer.
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim conStr As String = "Provider=Microsoft.JET.OLEDB.4.0;data source=C:\Databases\SourceDatabase\.mdb"
Dim strDest As String = "Provider=Microsoft.JET.OLEDB.4.0;data source=C:\Databases\DestDatabase.mdb"
Dim sqlStr As String = "SELECT * FROM site"
' Create connection object
Dim conn As OleDbConnection = New OleDbConnection(conStr)
Dim conn2 As OleDbConnection = New OleDbConnection(strDest)
' Create data adapter object
Dim da As OleDbDataAdapter = New OleDbDataAdapter(sqlStr, conn)
Dim da2 As OleDbDataAdapter = New OleDbDataAdapter(sqlStr, conn2)
' Create a dataset object and fill with data using data adapter's Fill method
Dim ds As DataSet = New DataSet
' Attach dataset's DefaultView to the datagrid control
Dim dv As DataView = ds.Tables("site").DefaultView
ListBox1.DataSource = dv
ListBox1.DisplayMember = "sitename"