473,406 Members | 2,220 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,406 software developers and data experts.

The Database Application Block

Hi all,

Can someone please reasure me that it is entirely possible to use the Data
Access Application in large applications - even those that require
transactions?

I have a friend who is adament that the application block is crap because it
uses static methods. He thinks that because its using static methods it is
completely riddled with concurrency holes.

He also believes that it will cock up transactions because it shares a
connection object or something.

I on the other hand am next to certain that the static methods are thread
safe and that transactions are handled correctly shared connection or not.

Can someone please reasure me and my paranoid friend :-) that the *Best
Practice* application block from Micorsoft are actually safe to use in
large, concurrent, transaction based situations without needing vast
amendments.

Many thanks to anyone who can advise.

Take care

Simon
Nov 22 '05 #1
2 1819
Hi,

it only has static state for parameters (etc DAAB has capability to cache
parameters for procs).

If you look at its code, you'll note it doesn't have a public constructor or
instance methods (cannot be instantiated, cannot have instance state) so
everything happens in a method calls and is released after call ends. E.g
means that multiple threads can call the methods very safely and the calls
won't mix up with each other (everything needed is given as parameter to the
method as is per the idea of static methods)

What comes to the transactions, you need to pass the SqlTransaction object
to DAAB method calls and then the state is kept it that transaction object
(basically)/connection associated with the transaction, not in DAAB.
Therefore transactions work just fine as well, though you'd of course try to
put them as much as possible into database procs themselves and not into
ADO.NET client code, if not necessary. But either way, no problems.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke
"Simon Harvey" <sh856531@microsofts_free_email_service.com> wrote in message
news:uu**************@TK2MSFTNGP11.phx.gbl...
Hi all,

Can someone please reasure me that it is entirely possible to use the Data
Access Application in large applications - even those that require
transactions?

I have a friend who is adament that the application block is crap because it uses static methods. He thinks that because its using static methods it is
completely riddled with concurrency holes.

He also believes that it will cock up transactions because it shares a
connection object or something.

I on the other hand am next to certain that the static methods are thread
safe and that transactions are handled correctly shared connection or not.

Can someone please reasure me and my paranoid friend :-) that the *Best
Practice* application block from Micorsoft are actually safe to use in
large, concurrent, transaction based situations without needing vast
amendments.

Many thanks to anyone who can advise.

Take care

Simon

Nov 22 '05 #2
As Teemu pointed out, there is no problem using the DAAB with large
transacted systems.

Just to add to that: one of the I'm familiar with uses this AB. The number
of transactions is fairly high (10,000 per hour), and the amount of data
being managed is somewhere around 100GB. We've had other load problems, but
not one that is traced to the DAAB.

Really, the DAAB is a convenience... I'm not sure I'd call it a "best
practice" DAL. It's nice, but you will still have to have a smart developer
doing smart things to use it well.

Hope this helps,
--- Nick

"Simon Harvey" <sh856531@microsofts_free_email_service.com> wrote in message
news:uu**************@TK2MSFTNGP11.phx.gbl...
Hi all,

Can someone please reasure me that it is entirely possible to use the Data
Access Application in large applications - even those that require
transactions?

I have a friend who is adament that the application block is crap because it uses static methods. He thinks that because its using static methods it is
completely riddled with concurrency holes.

He also believes that it will cock up transactions because it shares a
connection object or something.

I on the other hand am next to certain that the static methods are thread
safe and that transactions are handled correctly shared connection or not.

Can someone please reasure me and my paranoid friend :-) that the *Best
Practice* application block from Micorsoft are actually safe to use in
large, concurrent, transaction based situations without needing vast
amendments.

Many thanks to anyone who can advise.

Take care

Simon

Nov 22 '05 #3

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

Similar topics

2
by: Simon Harvey | last post by:
Hi all, Can someone please reasure me that it is entirely possible to use the Data Access Application in large applications - even those that require transactions? I have a friend who is...
5
by: B-Dog | last post by:
I have an old dos program that uses dat files to store the data and I'm trying to convert to dotnet. I'd like to be able to import the data into an access database but I don't know which format...
6
by: Guoqi Zheng | last post by:
It is a little strange but I got 105 connections on the database of my new application. It sounds that each time, one user login, the connections always remains there for forever. I am always...
1
by: dave | last post by:
I'm classic ASP developer and trying to switch to .net ...I'm newbie to ..net... In classic ASP for ADO connectivity i used to put below code in one separate file and used to include that file...
4
by: RS | last post by:
Hello All, Does anyone know what the best practice is for updating database schema? We are designing a smart client application where the .Net application is used online and offline. If the...
10
by: jt | last post by:
The program works like this: There is a form with a button. When the form is loaded, a separate thread is started which is retreiving/updating data in the database every x seconds. When clicked...
0
by: gm | last post by:
Immediately after generating the Access application from the Source Safe project I get: "-2147467259 Could not use ''; file already in use." If Access database closed and then reopened I get:...
4
by: ImOk | last post by:
I need to program generically. I am familiar with the ODBC layer but never used PDO or DB. Does anyone have any experience with these database layers? Thanks
0
by: narayan2586 | last post by:
Hi all, When ever i am trying to connect my application it's giving below error message: RemoteException occurred in server thread; nested exception is: java.rmi.RemoteException: ; nested...
2
by: Michael Howes | last post by:
I am trying to upgrade a large asp.net application from .Net 1.1 to ..Net 3.0 I'm getting an error when connecting to the database now that the app runs as a .Net 3.0 application. the...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
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.