Re: transaction and open table

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




"Ryan Liu" <RyanLiu_99@xxxxxxxxx> wrote in message news:eloYgRotHHA.1184@xxxxxxxxxxxxxxxxxxxxxxx
Hi,

I have few db write and read to execute, so I use transaction.

Is that a problem or is that a regular way that I only use transaction on
some cmds only, and other cmds I do not use trasaction, esp those read
actions, or even use another dbconnection to read?

The only time you need to be in a transactional mode is when you are updating, inserting or deleting records using a database table.


BTW, what does "open table" menas? Is that table only be "open" when someone
read or write it. Once all user finish read or write the db table, the
table should be "closed", is that right?

Yes, once the access is completed, then the connection should be closed and disposed, each time after the access.

http://www.sql-server-performance.com/jk_ado_transactions.asp

You should use Google and look up the ADO.NET *Using* statement that opens/closes/disposes things for you automatically.

.



Relevant Pages

  • Re: Urgent problem: Any help greatly appreciated
    ... Can you combine those store procedures to derive a new one in your SQL ... > I am trying to execute a number of SQL stored procedures in a single ... > transaction. ... > executing DataAccessProvider.executeBatchTransaction(ArrayList cmds", ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Urgent problem: Any help greatly appreciated
    ... Can you combine those store procedures to derive a new one in your SQL ... > I am trying to execute a number of SQL stored procedures in a single ... > transaction. ... > executing DataAccessProvider.executeBatchTransaction(ArrayList cmds", ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Urgent problem: Any help greatly appreciated
    ... Can you combine those store procedures to derive a new one in your SQL ... > I am trying to execute a number of SQL stored procedures in a single ... > transaction. ... > executing DataAccessProvider.executeBatchTransaction(ArrayList cmds", ...
    (microsoft.public.dotnet.general)
  • transaction and open table
    ... I have few db write and read to execute, so I use transaction. ... Is that a problem or is that a regular way that I only use transaction on ... some cmds only, and other cmds I do not use trasaction, esp those read ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: transaction and open table
    ... some cmds only, and other cmds I do not use trasaction, esp those read ... If the transaction is properly isolated, then those commands that you execute outside of the transaction will not see the changes that you have done inside the transaction until the transaction is committed. ... Moreover, since the transaction will place locks on the database to accomplish the isolation, depending on what you are doing you risk that the database commands that you are executing outside of the transaction might get blocked waiting for the transaction to finish. ...
    (microsoft.public.dotnet.languages.csharp)