473,573 Members | 3,265 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Transaction not commited rollback?

In VB 6, using ADO, SQL Server 2000

In my VB program I use the connection object (abc)
to begin a transaction.

abc.BeginTrans

I then, in my VB App, using ADO, execute multiple stored procedures
inserting records into temp tables ##Meetings,
reading them, and then finnaly executing (from my VB app
using ADO) as stored procedure that inserts records
into a non-temp table.

I then have a abc.CommitTrans

What if my VB program crashes before the
committrans is executed, I assume that the transaction
is rolled back, even though no explicit rollback
is issued, because my VB program has crashed.

Thank You for your help,

Laurence Nuttall
Programmer Analyst III
UCLA - Division of Continuing Education
Jul 23 '05 #1
1 1884
Larry (Bl***@Bliff.co m) writes:
In VB 6, using ADO, SQL Server 2000

In my VB program I use the connection object (abc)
to begin a transaction.

abc.BeginTrans

I then, in my VB App, using ADO, execute multiple stored procedures
inserting records into temp tables ##Meetings,
reading them, and then finnaly executing (from my VB app
using ADO) as stored procedure that inserts records
into a non-temp table.

I then have a abc.CommitTrans

What if my VB program crashes before the
committrans is executed, I assume that the transaction
is rolled back, even though no explicit rollback
is issued, because my VB program has crashed.


Yes.

If you want to verify - and this is a good exercise just try it. For
instance run the program from the VB debugger set a break point somewhere,
and then kill VB from the Task Manager. Now check that there is no data
which should not be there.
--
Erland Sommarskog, SQL Server MVP, es****@sommarsk og.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #2

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

Similar topics

1
439
by: Avanish Pandey | last post by:
Hello All We have 3 differen services (in 3 different server) Service A,B,C . We want to implement distributed transaction when call methods of B and C from A. Is it possible? if yes then how? I have read the doc regarding this: http://www.developer.com/net/asp/article.php/3385631 but it will not work when methods are in different...
2
2619
by: Dano | last post by:
Hi all! Perhaps a wise soul can help me here. I have an insert routine for an ASP.Net application and it works fine, but I decided to test the transaction rollback capabilities by stopping the SQL server when it was just about to insert the record (I use a breakpoint and then stop the server). What should have happened is that the...
9
7584
by: John Sidney-Woollett | last post by:
Is it possible to use the dblink and dblink_exec features from inside pl/pgsql functions to mimic the behaviour of nested transactions by calling another function or executing some SQL via the dblink (into the same database)? Does the SQL statement executed within the dblink sit in its own isolated transaction/session? And would an error...
6
3164
by: Thapliyal, Deepak | last post by:
Hi, Assume I have a bank app.. When customer withdraws $10 from his accouint I have to do following --> update account_summary table --> update account detail_table Requirement: either both transactions should succeed or both transactions should be rolled back in case of failure.
1
3882
by: | last post by:
Hi, I have a problem. When my computer loses connection to server during transaction it is rolled back automaticly by server after 2-5 minutes. During the time a can reset my computer, run my program again and I can see data from not commited transaction becouse I have to set isolation level to read uncommited. How to force the server...
3
4604
by: joshsackett | last post by:
I am redesigning an application that distributes heldesk tickets to our 50 engineers automatically. When the engineer logs into their window a stored procedure executes that searches through all open tickets and assigns a predetermined amount of the open tickets to that engineer.The problem I am running into is that if 2 or more engineers log...
2
2787
by: Dan Kelley | last post by:
I have 2 services, ServiceA and ServiceB. Certain user driven functions require ServiceA to perform some DB tasks, before sending a request to ServiceB to perform some additional tasks. If ServiceB fails to execute the request, I would like ServiceA to rollback its changes. ServiceA and ServiceB are located on 2 different servers on the same...
0
920
by: RAM | last post by:
Hello, I am learning .NET. I am writing database application which contains some operations accessible from ASP.NET menu. This operations should be separate transactions. I wrote: public partial class PZ : System.Web.UI.Page { bool Commited; protected void Page_Load(...)
1
8305
by: Matik | last post by:
Hi to all, Probably I'm just doing something stupid, but I would like you to tell me that (if it is so), and point the solution. There ist the thing: I' having a sp, where I call other sp inside. The only problem is, the name of this inside sp is builded variously, and executed over sp_executesql:
0
7779
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7693
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...
0
8021
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, 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. ...
1
7781
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8064
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5590
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5291
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...
0
3732
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...
0
1040
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.