P
pcthug
Hi All,
I am creating multi-tier app in vb.net using visual studio .net.
I create a invoice.vb class file with properties, events and methods. This
also has a line item collection class (lineitem.vb & lineitems.vb). I create
a form (form1.frm) and write the corresponding code to initialize an invoice
object, there are textboxes on the form to display the data, an update and
load button. My data is stored in an access database.
Q. How should my objects interact with the database? eg. When the user
enters in values for the required properties etc and clicks update (we
already have an instance of the invoice object), the code behind calls the
set method of the corresponding properties in the invoice class etc.
Q. Is this where the connection should be made to update the database, if so
how?
or
Q. Should I have a data object also that is initialized when a invoice
object is and update commands are passed through when properties are set?
I hope this makes sense to someone! any help would be cool.
Cheers
I am creating multi-tier app in vb.net using visual studio .net.
I create a invoice.vb class file with properties, events and methods. This
also has a line item collection class (lineitem.vb & lineitems.vb). I create
a form (form1.frm) and write the corresponding code to initialize an invoice
object, there are textboxes on the form to display the data, an update and
load button. My data is stored in an access database.
Q. How should my objects interact with the database? eg. When the user
enters in values for the required properties etc and clicks update (we
already have an instance of the invoice object), the code behind calls the
set method of the corresponding properties in the invoice class etc.
Q. Is this where the connection should be made to update the database, if so
how?
or
Q. Should I have a data object also that is initialized when a invoice
object is and update commands are passed through when properties are set?
I hope this makes sense to someone! any help would be cool.
Cheers