C
Cindy H
Hi
I'm using an access database and vb.net
I have been using the following type of function to get data from one table.
This is working great -
Public Shared Function GetAllLotsForSale() As DataSet
Dim dsProperties As New DataSet
Dim cmdProperties As New OleDbCommand
Dim sSelect As String = "SELECT Address, City, Status, Price, Description,
LotSize, Display, PathToImage, PathToTour FROM LotsForSale WHERE Display =
'y' ORDER BY Address"
cmdProperties.CommandText = sSelect
cmdProperties.Connection = MyConnection()
Dim daProperties As New OleDbDataAdapter
daProperties.SelectCommand = cmdProperties
daProperties.Fill(dsProperties, "LotsForSale")
Return dsProperties
End Function
Now, I would like to do a select with more then one table for example:
"Select customer,customerID, order.Orderid from Order, Customer where
customer.customerID = order.customerID.
The problem is I don't know how to handle this.
The dataadapter fill statement only wants one table name.
Does any one know how I should do this?
Thanks,
CindyH
I'm using an access database and vb.net
I have been using the following type of function to get data from one table.
This is working great -
Public Shared Function GetAllLotsForSale() As DataSet
Dim dsProperties As New DataSet
Dim cmdProperties As New OleDbCommand
Dim sSelect As String = "SELECT Address, City, Status, Price, Description,
LotSize, Display, PathToImage, PathToTour FROM LotsForSale WHERE Display =
'y' ORDER BY Address"
cmdProperties.CommandText = sSelect
cmdProperties.Connection = MyConnection()
Dim daProperties As New OleDbDataAdapter
daProperties.SelectCommand = cmdProperties
daProperties.Fill(dsProperties, "LotsForSale")
Return dsProperties
End Function
Now, I would like to do a select with more then one table for example:
"Select customer,customerID, order.Orderid from Order, Customer where
customer.customerID = order.customerID.
The problem is I don't know how to handle this.
The dataadapter fill statement only wants one table name.
Does any one know how I should do this?
Thanks,
CindyH