The object itself shouldn't have db calls in it.
It should be an object, with properties , methods, and sometimes events.
In the datalayer, you will populate either a IDataReader or a DataSet, which
you will use to create your objects.
Then, I usually have another class, in the biz layer.
The biz layer will call the datalayer, it will get the IDataReader or
DataSet.
This class will then loop over the IDataReader or DataSet, to create your
objects.
Your objects should not be tied to a specific database, which is what you
will end up having going with the "integrated db route".
See my other post:
"JimO" <jo************@DEF-earthlink.net> wrote in message
news:0T*****************@newsread4.news.pas.earthl ink.net...
As a general rule, is it better to place database calls as part of the
object the operate on or just put all the calls in thier own namespace?
Ex
Dim userObject = New UserClass()
userObject.InsertUser()
Or
Dim DBCalls = New SystemDBCalls()
DBCalls.InsertUser(userObject)
I realize there are a few different ways you can code this but you get the
idea. Or perhaps this is just a matter of preference or function?
Thanks,
Jim