ssql is a string , SELECT statement
i figured out to put a BindingSource Control onto my form and that added the typed dataset dsPitem to my form as well. this is the updated code
Code:
'data access using OLEDB
[COLOR=DarkRed]Dim dc1 As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\chrism\Desktop\qs2.net test\db.mdb")[/COLOR]
Dim da1 As New OleDb.OleDbDataAdapter(sSQL, dc1)
Dim dr1 As DataRow
da1.Fill(DsPitem, "Pitem")
ListBox1.Items.Clear()
For Each dr1 In DsPitem.Tables("Pitem").Rows
ListBox1.Items.Add(dr1("item"))
Next
1. instead of creating this OLEDBCONNECTION object, how can i make reference to the Connection object I created when creating the typed datasets? I named it dbConn but i dont' know how to use it in my code.
2. do i still need to call the SQL statement to the dataAdapter with Typed Datasets?
The whole purpose for this project is to familiarize myself with ADO.NET.
A. Populate List Box with [item] from dsPitem dataset
B. create Form2 on Listbox1_click event
C. Populate Listview on Form2 with records from dsRouting dataset that match the [item] field selected on form1.listbox