I guess This is a two part Question: first part being How to load 2 tables from the same database where both tables can not be joined by a Common field?
Would I have to Do 2 Different select Commands ? as in the below example.
My second part. Im not sure how to syntax the Dataset to store the second table with fill. Here is the code I am trying to use:
Code:Private Sub ManagersForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim Db As String Db = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Path & "\EmployeeVzwSlots.mdb" Con.ConnectionString = Db OleDbmcmnds(0) = New OleDbCommand("SELECT AwardSubject, SubjectSpinsAwarded FROM AwardedSubjects") OleDbmcmnds(1) = New OleDbCommand("SELECT Id, FirstName, LastName, SpinsAwarded, SpinsUsed, MoneyWon FROM EmployeeInfo") For index As Int16 = 0 To 1 DA.SelectCommand = OleDbmcmnds(index) DA.SelectCommand.Connection = Con DA.Fill(DS.Tables(index)) Next index




Reply With Quote