MySQL VB.NET Tutorial 12 : Show database values in Table or DataGridView




VB.NET – How to get user entered data from datagridview to windows Visual Basic Insert, Update and Delete from DataGridView to sql server,MySql Sql …

Original source


34 responses to “MySQL VB.NET Tutorial 12 : Show database values in Table or DataGridView”

  1. hi ive just follow your code and after ive save my data in the database its duplicating may data in the table and for me to see the updated table i just need to click the load table button again. what should i do? thanks

  2. hi sir , i watched all your tutorials regarding this topic and somehow i am stuck at this problem when you click on load button theres an error says you cant connect to this mariadb server, can you please tell me how to solvee this

  3. hi .. i'd follow the things you did but i've got this kind of error : the selectCommand property has not been initialized before calling 'FILL'.. Can you help me fix this error?! thank you very much in advance

  4. Greetings sir! I am a big fan of yours and I kinda trying to make my own program which is base from your teachings. Well the problem is I do not know how to make report base on database. I tried to watch different videos with regards to report viewer but I still fail to do what I want. Please make some tutorial with regarding my problem. Thanks in advance sir. God bless

  5. Excellent. I must have watched this series 10 times now. It would be grand if you could use  a broader scope of database variables instead of just using strings. Why not a date, or blob example added in. That would have made me drool over your tutorial.

  6. Good day sir i was trying to do the things you said in this video, once i run the system there is statement said that " Object reference not set to an Instance of an object"

    here is the code

     Private Sub Load_table()
            MySqlConn = New MySqlConnection
            MySqlConn.ConnectionString = "server=localhost;userid=root;password=;database=student_attendance"

            Dim dbDataset As New DataTable
            Dim bSource As New BindingSource
            Dim SDA As MySqlDataAdapter

            Try
                MySqlConn.Open()
                Dim Query As String
                Query = "Select * from student_attendance.student"
                COMMAND = New MySqlCommand(Query, MySqlConn)
                SDA.SelectCommand = COMMAND
                SDA.Fill(dbDataset)
                bSource.DataSource = dbDataset
                DGStudent.DataSource = bSource
                SDA.Update(dbDataset)

                MySqlConn.Close()

            Catch ex As Exception
                MessageBox.Show(ex.Message)

            Finally
                MySqlConn.Dispose()

            End Try

    also the SDA has an error said that " variable SDA is used before it has been assigned a value. a null reference exception could result at runtime.

    so i put the Dim SDA as Mysqldataadapter in GLobal the error was gone, but the " Object reference not set to an Instance of an object" is still the problem please help me to solve this case thank you so much!

Leave a Reply