Public Class Customer
Dim oDataAccessLayer As DataAccessLayer
Dim _ds As dsNorthwind
Dim _dr As dsNorthwind.CustomersRow
Public Sub New()
oDataAccessLayer = New DataAccessLayer
_ds = New dsNorthwind
End Sub
Public Property oDsNorthwind()
Get
Return _ds
End Get
Set(ByVal Value)
_ds = Value
End Set
End Property
Public ReadOnly Property CustomerID() As String
Get
Return _dr.CustomerID
End Get
End Property
Public Property CompanyName() As String
Get
Return _dr.CompanyName()
End Get
Set(ByVal Value As String)
_dr.CompanyName = Value
End Set
End Property
Public Property ContactName() As String
Get
Return _dr.ContactName
End Get
Set(ByVal Value As String)
_dr.ContactName = Value
End Set
End Property
'Retrieve all customers
Public Function RtvAllCustomers() As dsNorthwind
oDataAccessLayer.RetrieveAllCustomers(_ds)
Return _ds
End Function
'Create single customer
Public Sub RtvCustomer(ByVal ID As String)
_dr = _ds.Customers.NewCustomersRow
oDataAccessLayer.RetrieveCustomer(ID, _dr)
End Sub
'Retrieve single customer
'Update single customer
'Delete single customer
End Class
The dataset contains the orders table as well.
"Cor Ligthert" wrote:
Rodchar,
I hope you become not agry however it sounds so strange for me.
A datatable is a class that describes a kind of entity and has methods and
events for that (it reflects a database table). A dataset describes even a
collection of datatables and can reflects a complete database..
Now becomes dataset a property of a class. And therefore I become confused.
Can you show some code of that class.
Cor