Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27513

VS 2010 load multiple csv file to mysql via mysql client

$
0
0
Hi Expert,

I am new coders, I have a problem importing or updating mysql table, I dont know how to start this, Is this possible?, I have only little code but it is very bugy, what is the best language vb.net or c#, please help me

here is my buggy code:

Code:

Private Sub cmdsave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdsave.Click

        Dim conn As New MySqlConnection

        conn.ConnectionString = "Server=server; User Id=root; Password=; Database=stock_data"

        'Dim myConnection As New MySqlConnection(conn)

        Dim cmd As String = "SELECT 8 FROM stock_data "

        DA = New MySqlDataAdapter(cmd, conn)
        ' This line of code to generate update commands automatically.
        ' This update method of would not work without this line of code.
        Dim MySQLCommandBuilder As New MySqlCommandBuilder(DA)

        conn.Open()

        DS = New DataSet()
        DA.Fill(DS, "stock_data")

        BS = New BindingSource
        BS.DataSource = DS.Tables(0)

        Dim BN As BindingNavigator = New BindingNavigator()
        BN.BindingSource = BS
        DataGridView1.DataSource = DS

    End Sub


Viewing all articles
Browse latest Browse all 27513

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>