View Single Post
  #2 (permalink)  
Old January 17th, 2008, 06:42 PM
Chris Van Duin Chris Van Duin is offline
Registered User
 
Join Date: Jan 2008
Location: , , Australia.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think that it will only get the results of the last query. What you might need to do is use the dateset object to have two command objects..one for each query. A dataset can contain multiple tables. You usually only use the first one, eg, myDataSet.Tables(0). By performing two queries on the same dataset you can access them individually. Eg myDataSet.Tables(0) for the first table and myDataSet.Tables(1) for the second resultset. If you gave the tables a name in the command object, eg, "Orders" and "Products", you can use the name rather than the index number, eg, myDataSet("Products"). By having the two tables within a dataset object you can also create a relationship between them based on a key, eg, ProductId.
Reply With Quote