prischenkoOOO
Programmer
Excuse for English.
My code:
'''''''''''''''''''''''''''''''''''''''''''''''''''''' '
Dim strConn As String
Dim strSQL As String
strConn = " Provider=Microsoft. Jet. OLEDB.4.0; Data Source=E:\Klient __.mdb "
dinamicDB = New OleDb. OleDbConnection (strConn)
DBAdapter = New OleDb. OleDbDataAdapter
strSQL = " SELECT * FROM Klient "
DBAdapter. SelectCommand = New OleDb. OleDbCommand (strSQL, dinamicDB)
dinamicDB.Open ()
Dim DS As DataSet
DS = New DataSet
DBAdapter. Fill (DS, "Klient")
Dim dr As DataRow
Dim Col As DataColumn
For x = 0 To DS.Tables ("Klient") .Rows () .Count - 1
Col = DS.Tables ("Klient") .Columns (1) ' a name of the client
dr = Col. Table. Rows (x)
st = dr. ItemArray (1)
Grid.set_TextMatrix (x + 1, 1, st)
Col = DS.Tables ("Klient") .Columns (0)
dr = Col. Table. Rows (x)
st = dr. ItemArray (0)
Grid.set_TextMatrix (x + 1, 4, st) ' id the client
Next
'''''''''''''''''''''''''''''''''''''''''''''''''''''' '
I need to click the mouse on a line 'Grid', to receive 'id' and then the half-scientist 'id' to find DS.Tables ("Klient")
In VB.6 I used RecordSet. FindFirst
It is thankful in advance
Thanks.