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!!! 1 1986
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!!! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 update after making changes, but I don't
want that update button.
How can I get the updated object when the user presses one of my other
action buttons?
|
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 parameter.
When the Update-method is invoked by the ObjectDataSource, the object
referenced is not the same object returned by the Select-method, but a new
object with only the values from the Edit-template. So basically I get a
reference to a useless...
|
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 detail of a product. On my
page I have a product name and a short description. So I declare an
ObjectDataSource in my page
<asp:ObjectDataSource ID="productData" runat="server"
SelectMethod="GetProduct"
|
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 connect to my
business logic everything works fine. The problem is that I find this
quite limited and I need to do some custom work with the parameters, so
I am trying to code everything by hand in the code behind.
>From a security perspective,...
|
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"
SelectMethod="GetUsers" TypeName="BizObject"></asp:ObjectDataSource>
This works, however I need to explicitly clear/remove the cache when I
| |
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 paging.
The objectdatasource SelectMethod returns a dataview.
When my objectdatasource is declared in the codebehind, sorting is not
working and i receive following error when clicking on a datagrid's
column header. I made the same test...
|
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 ID="odsAccounts" runat="server" ...
EnableCaching="true" SqlCacheDependency="CommandNotification">
....
</asp:ObjectDataSource>
|
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 so I get the ObjectDataSource. No problem
.....
ObjectDataSource src = .... //is ok i have it
|
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 simply working with objects in memory.
So, it appears as though Microsoft requires that our datamapper classes
reside inside a folder called "App_Code", and NO WHERE ELSE.
So, has anyone successfully been able to place their datamappers in a...
|
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 selected event of the objectdatasource but some where in the one of button click event.
i tried of adding the parameters but it didn work for me..
<asp:ObjectDataSource ID="ODSEditSchedules" TypeName="Schedules" runat="server"...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |