TADS Posted May 25, 2010 Posted May 25, 2010 hi all... this is my 1st post and i have a problem.... im using Mysql with VB.net i have a table in mysql and i can receive all data from that table into a datagrid and display it... but i would like to use each row in the datagrid... ie: for each row in datagrid1 Query() but i am unsure how to do this... this is how im filling a Datatable... Public Sub connectionmysql() Dim conn As MySqlConnection conn = New MySqlConnection conn.ConnectionString = "Database=" + info.DB + ";" & _ "SERVER=" + info.server + ";" & _ "UId=" + info.Uid + "; Password= " + info.pass + ";" Dim commandtext As String Dim adapter As MySqlDataAdapter Dim table As DataTable ds = New DataSet() commandtext = "select ip from ips;" Try adapter = New MySqlDataAdapter(commandtext, conn) table = New DataTable adapter.Fill(table) DataGrid1.DataSource = table Catch ex As Exception MsgBox(ex.ToString) End Try End Sub so how could i use each ip from the datatable or datagrid1 and run my Query() function on it??? i can do this from a txt file stored on a users pc but then i cannot make it user friendly being as i cant update there txtfile and mysql is just a better way of storing,updating and managing the data i need!!! thanks for your time reaidng Kev Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.