Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Using cnn As New MySqlConnection("server=..;user id=..;password=...;database=..;")
- Dim cmdSelect As MySqlCommand = New MySqlCommand("Select * from `" + table + "`")
- cmdSelect.Connection = cnn
- Dim ad As New MySqlDataAdapter(cmdSelect)
- ad.AcceptChangesDuringFill = False
- ad.Fill(dt)
- End Using
- Using cnn As New OleDbConnection("Provider=Microsoft.jet.oledb.4.0;Data Source=D:\...")
- Dim cmdSelect As OleDbCommand = New OleDbCommand("Select * from `" + table + "`")
- cmdSelect.Connection = cnn
- Dim ad As New OleDbDataAdapter(cmdSelect)
- Dim cmdBuilder As New OleDbCommandBuilder(ad)
- cmdBuilder.QuotePrefix = "["
- cmdBuilder.QuoteSuffix = "]"
- Dim cmd As OleDbCommand = cmdBuilder.GetInsertCommand()
- cmd.Connection = cnn
- ad.InsertCommand = cmd
- ad.Update(dt)
- End Using
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement