473,396 Members | 2,039 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

ObjectDataSource

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!!!
Feb 7 '06 #1
1 1950
DWS
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/de...dataaccess.asp

Good Luck
DWS

"Jim Heavey" wrote:
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!!!

Feb 9 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Jim Hammond | last post by:
I am passing the whole object instead or parameters in my select and update methods. I can get the updated object if I set UpdateMethod, let ASP.NET autogenerate an update button, and then press...
5
by: Ole M | last post by:
I'm having some trouble using the ObjectDataSource in ASP.NET 2.0. I have a wrapper that contains the static methods for Select and Update. The Update-method takes the business object as...
3
by: avezina | last post by:
We would like to use those new cool features of Asp.Net 2.0 like the ObjectDataSource in our project. I tried few basics examples and its work well. Let's say I have a page that displays a...
0
by: Eiriken | last post by:
Hello everyone, I am using ASP.NET 2 and trying to bind a objectdatasource to a gridview. By doing this the most common way by adding an objectdatasource to the page and by using the wizard to...
2
by: J055 | last post by:
Hi I've implemented caching for my ObjectDataSource. <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" EnableCaching="True" CacheDuration="10" CacheExpirationPolicy="Sliding" ...
0
by: Northern | last post by:
Hello, I have some trouble to declare and instantiate dynamically an ObjectDataSource in the codebehind file. The idea is to bind the objectdatasource to a gridview and have automate sorting and...
10
by: J055 | last post by:
Hi I've been trying out SqlCacheDependency using the ObjectDataSource and SQL Server 2005. It all works quite well with the minimum of configuration, e.g. <asp:ObjectDataSource...
14
by: Rolf Welskes | last post by:
Hello, I have an ObjectDataSource which has as business-object a simple array of strings. No problem. I have an own (custom) control to which I give the DataSourceId and in the custom-control...
5
by: Randy Smith | last post by:
Hi ALL, I wonder if anyone has been using n-tier to bind to a GridView control by using the ObjectDataSource. This is our first OOP web application, and we have no tables. Right now we are...
3
by: btreddy | last post by:
Hii all, I've a problem regarding passing select parameters to objectdatasource from code behind. i would like to pass the select parameters to a objectdatasource ..not in the selecting or...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.