imam ovo:
deklarisanje
Dim con As OleDbConnection
Dim dAdapt As OleDbDataAdapter
Dim dSet As DataSet
Dim a AsInteger = 0
Dim dBind AsNew BindingSource
otvaranje
con = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & "C:\DataBase.accdb")
con.Open()
dAdapt = New Data.OleDb.OleDbDataAdapter("select * from Table1", con)
dSet = New DataSet
dAdapt.Fill(dSet)
dBind.DataSource = dSet
dBind.DataMember = dSet.Tables(0).ToString()
citanje podataka u textboxove kada se promeni index u listboxu
dSet.Tables(0).PrimaryKey = New DataColumn() {dSet.Tables(0).Columns("ime")}
Dim row As DataRow
row = dSet.Tables(0).Rows.Find(ListBox1.Text)
TextBox1.Text = row("Maticni_broj")
TextBox2.Text = row("Ime")
kako da, na osnovu ovog koda, vidim Table1 u datagridu??
hvala...
|