PC Review


Reply
Thread Tools Rate Thread

Is it bad to use transactions for read operations (keeps conn. ope

 
 
=?Utf-8?B?c3dlZ2VsZQ==?=
Guest
Posts: n/a
 
      15th Feb 2005
Hi I am trying to find out if it is bad, and how bad, to start a database
transaction on a set of read operations. By starting a transaction I can
keep open the database connection...but is there significant overhead for
transaction?

Basically I am populating a set of objects and I may hit the database 5 to
10 times on any given set of parent/child objects.

I cannot use stored procedures.

What do you think?
 
Reply With Quote
 
 
 
 
geeksgk@yahoo.com
Guest
Posts: n/a
 
      15th Feb 2005
Transactions are meant for insert/update/delete operations (not for
read)

if you want to keep the same connection for whatever reason, then use
sqldatareader class (assuming you are using sql server). Remember to
close the connection when you exit the program or when it an error
occurs.

 
Reply With Quote
 
Relaxin
Guest
Posts: n/a
 
      17th Feb 2005
I think that you are wrong.
Transactions are/can be used for read operations within a database.

You have Serializable and Repeatable Read type of isolation level for a
Transaction.

So, transactions do/can make an impact on how data is read.


<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Transactions are meant for insert/update/delete operations (not for
> read)
>
> if you want to keep the same connection for whatever reason, then use
> sqldatareader class (assuming you are using sql server). Remember to
> close the connection when you exit the program or when it an error
> occurs.
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Maximum read/write operations on a drive jondelac@gmail.com Storage Devices 27 5th Dec 2006 11:42 PM
NetworkStream Read/Write operations - # bytes read/written. =?Utf-8?B?Q2hhcmxlcw==?= Microsoft C# .NET 1 23rd Nov 2006 02:44 AM
Conn.Close & Conn.Dispose Simon Harris Microsoft ASP .NET 6 1st Jun 2005 02:01 PM
Conn.Close() and Login Error w/Subsequent Conn.Open() Christopher Walls Microsoft ADO .NET 0 4th May 2004 05:37 PM
Transactions and conn pooling Geoffp Microsoft ADO .NET 1 27th Oct 2003 08:12 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:47 AM.