Try 'Dim Cmd As OleDb.OleDbCommand Dim Con As OleDb.OleDbConnection Dim Sql As String = Nothing 'Dim Reader As OleDb.OleDbDataReader Dim ds As New DataSet() Dim adapter As New OleDbDataAdapter() Con = New OleDb.OleDbConnection(DBpath) Sql = "SELECT Users.* from Users where LoginID=" & "'" & TextBox1.Text & "'" 'Cmd = New OleDb.OleDbCommand(Sql, Con) adapter.SelectCommand = New OleDbCommand(Sql, Con) Con.Open() adapter.Fill(ds, "Users") Dim item As DataTable = ds.Tables(0) DataGridView1.DataSource = ds.Tables("Users") Console.WriteLine("Table name: {0}", item.TableName) Console.WriteLine("Its columns are:") For Each col As DataColumn In item.Columns If col.ColumnName.Substring(col.ColumnName.Length - 3) = "Upd" Then -----HERE I GOT TO FIND THE FIELDS I WANT BUT NEED TO PICK the value of that field_______ 'If row(col.ColumnName).Item.ToString = "yes" Then Console.WriteLine("{0}" & vbTab & "{1}", col.ColumnName, col.DataType) End If End If Next Con.Close() Catch ex As Exception MsgBox(ex.Message) End Try End Sub
col.ColumnName.StartsWith( "Upd" )
col.ColumnName.EndsWith( "Upd" )
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)