ObjectDataSource

G

Guest

I have not used this new object in 2005, and I have a few question about if I
can use it, im my particular situation.

I have created a class which contains all of my methods for accessing all
tables in my database. This class hides from the calling class the type of
database which will be accessed (Oracle or SQL Server) and it manages the
Connection object, ensuring that only a single connection is being used.

I presume that I can bind my control, say a drop down, to this class, or is
there some requirement that all the methods must be static? Assuming that I
can bind to it, I am unsure of when these events will fire. The page load
event must fire in order for me to create an instance of the class which has
all of my Data Access Layer Methods. Then assuming that it fires after the
page load, how can I be sure that the connection is closed after the Last
control binding has fired.

Thanks in advance for your assistance!!!
 
G

Guest

Jim,

Yes if your class implements either; I think its ienumerable or IListsource
you can bind a drop down to it or simply return an array and bind your drop
down to the array. Get around the statics by initializing your class just
before you use it. I've never used it but I think there is a page_unload
event where you could ensure your connection is closed.

The new asp.net 2.0 database stuff is sweet you should check it out built
for speed cache, it handles the connections for you, and serializes data as
binary for reduced size among other things.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvs05/html/dataaccess.asp

Good Luck
DWS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

objectdatasource 1
objectdatasource filter. 3
objectdatasource. 1
ObjectDataSource 2
objectDataSource 0
Objectdatasource paging 0
Registration Form 7
ListView::InsertItemTemplate / ObjectDataSource 0

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top