Solved

RaisError in Vb6 not showing up

Posted on 2002-05-21
3
732 Views
Last Modified: 2008-03-06
I have a trigger on insert that uses 2 select statements to check to see if the transaction is rolled backed or not. When the condition is met to be rolled back I use the
RaisError ('This transaction will be rolled back', 16, 1)
message. the only problem is that the message is not getting back to the vb application although the record is being rolled back. If I run it in the analyzer I do see the message.
I am using SQL 2000.

0
Comment
Question by:rvindust
3 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 7025687
Please maintain your open questions:

Faxing from exchange Date: 11/16/2000 11:45AM PST
http://www.experts-exchange.com/jsp/qShow.jsp?ta=exchangesvr&qid=11890858
SQL Setup Date: 03/12/2001 04:52AM PST
http://www.experts-exchange.com/jsp/qShow.jsp?ta=mssql&qid=20090209
Domain logon permissions Date: 08/29/2001 05:04AM PST
http://www.experts-exchange.com/jsp/qShow.jsp?ta=win2k&qid=20175621
DSL VPN connection sharing Date: 01/10/2002 08:45AM PST
http://www.experts-exchange.com/jsp/qShow.jsp?ta=win2k&qid=20253681
VPN Logon Date: 02/16/2002 09:16AM PST
http://www.experts-exchange.com/jsp/qShow.jsp?ta=win2k&qid=20267631

Thanks,
Anthony  
0
 

Accepted Solution

by:
VBMeera earned 50 total points
ID: 7031220
hey,
r u using the same syntax in vb
"RaisError ('This transaction will be rolled back', 16, 1)"
the above is not Vb syntax
err.raise (err.number,err.source,err.description)
try this
0
 

Author Comment

by:rvindust
ID: 7236347
I found some information on this. you have to move thru the errors collection because VB does not always raise the error.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now