Solved

RaisError in Vb6 not showing up

Posted on 2002-05-21
3
729 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

747 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

12 Experts available now in Live!

Get 1:1 Help Now