Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database Update Problem

Status
Not open for further replies.

baiju

Programmer
Mar 13, 2002
3
JP
Hii all

I am using VB6 as front end and SQLServer7 as the database.In our application in certain occassions all rows are not updationg correctly.How can I track that the update occured with some errors.If it happens with errors i want to roll back the changes and repeat the action again until it gets updated correctly.
(In oracle we check the status of sqlca.sqlcode ,if it is 0 then success,1 for faliure,100 for action executed with errors).
please help me
 
Dear

In VB, you are using SQL Queries at Front End side then you can use Transaction to update the data in one successfull batch.

You should strat Transaction using Begin Transaction and if you get an error then you write RollBack Transaction and Exit Sub and if you don't get any error then you use Commit Transaction.

You can see the MSDN to see How to use Transactoin in VB.

Regards,
Essa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top