Examples of inserting and removing odbc style from vb.net to mySQL

jnash

Well-known member
Joined
Oct 20, 2006
Messages
111
Programming Experience
Beginner
i would like some simple examples, after trailing this forum for hours and google i cant seem to find some basic examples, im now so stuck, ive managed to connect, here is the code i have completed, i know i need the sql syntax some one help a tired vb.net newb

what im trying to do intially is add the values from the textboxes on my form into the table tblMembers in the database supervid

thank you in advance


Jon

VB.NET:
  Private Sub btnAddCustomer_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAddCustomer.Click
        conn = New MySqlConnection()
        conn.ConnectionString = "server=localhost;" _
          & "user id=root;" _
          & "password=password;" _
          & "database=tester"
        conn.Open()
        MessageBox.Show("Connected to Database!")

        conn.Close()
        conn.Dispose()
    End Sub
 
Last edited:
A working example

Here is an example. It does all the load, insert, update, delete and uses a binding source so text boxes are sync with datagrid.

Just change the database path or put mdb on C:\

HTH
 

Attachments

  • MSACCESS_EDITABLE_GRID_V2.zip
    66.8 KB · Views: 20
Back
Top