Hi,
I created a program to process the files in a directory. It also connects to the SQL server for data processing. The program catches any exception encountered. But what I would want to do is to force it to stop from processing. say if an error is encountered while processing file 3, i want it to stop and issue a rollback instead of continuing to process the rest of the files. I did put a return but there's no effect.

thanks!

Application.Exit()

Read more on SQLTransaction class, if you search on this problem you may find something called COM+ don't go through it your problem can be solved using SQLTransaction class, don't overhead yourself by reading in COM+

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.