Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

SQL Server 2000 - Before Commiting the transaction.

Guest
Nov 30, 2009 Nov 30, 2009

Hi All,

I am using CF7 along with SQL Server 2000.

And I am in a situation where I need to update some set of data to make sure that the changes are getting reflected in the front end.

My approach is like, trying some update statements inside "Begin Tran" block.

It goes like this,

begin tran

update table1 set field1='value' where cond='condition';

And I am just refreshing my application (in the browser). But unusually it takes a bit time to load, and no records are being pulled out after that..

My question is, do I need to perform a "Commit" to avoid this hanging kinda behaviour?.

Any ideas?.

344
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Dec 04, 2009 Dec 04, 2009

I'm not sure I fully understand your issue, but I suspect that you will need to commit the transaction before that changes will be available to your web site.  If your changes are in one UPDATE statement a transaction isn't usually required since this is a single statement.  Database transactions are intended to group multiple SQL statements into a single block so that all changes will succeed or all will fail.

Please post your CF and SQL code and the steps to re-create your issue.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 04, 2009 Dec 04, 2009
LATEST

Do your update first.  Then do a select and display the results.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources