Brad, I am not sure how you are doing this, but like I said, you can get this from the Errors Collection.
Here is one in C# using the SqlException class, easily convertible to VB.Net: http://www.davidpenton.com/testsite/scratch/tsql.raiserror.aspx FWIW, if you are using VB.Net I don't know why you are using Err.number and Err.Description...The Exception classes are much stronger. For Classic ASP users, ADO has its own error colelction. But, this is available in the VBScript Errors collection also. Your severity needs to be at least 11 (with ADO 2.7 - I believe you need ADO 2.5 at least but I can't substantiate this claim). I made a test for this: http://www.davidpenton.com/testsite/scratch/tsql.raiserror.asp David L. Penton, Microsoft MVP JCPenney Application Specialist / Lead "Mathematics is music for the mind, and Music is Mathematics for the Soul. - J.S. Bach" [EMAIL PROTECTED] Do you have the VBScript Docs or SQL BOL installed? If not, why not? VBScript Docs: http://www.davidpenton.com/vbscript SQL BOL: http://www.davidpenton.com/sqlbol -----Original Message----- From: T. Bradley Dean [mailto:[EMAIL PROTECTED]] >This allow you to send a string of your choosing That's exactly what I'm doing. But how do I retrieve that string? My stored procedure always returns strings through the print statement - it never returns any records. ~Brad -----Original Message----- From: Tom Vande Stouwe [mailto:[EMAIL PROTECTED]] The PRINT function does not 'Print' it is a term in TSQL to mean the same as select, with out the need for a query. This allow you to send a string of your choosing without using a variable and select. The SP uses Print statements to format screen output If (Select count (*) From tblMessages Where ...conditions...) > 0 Begin Print 'Messages with Charles Carroll as Sender' Select msgno MsgNumber , msgsubj Subject , msgDate Date from tblMessages Where ...conditions...) End Else Print 'No messages from Charles Carroll are in the message base' This will produce a headline and then the records if there are messages, or the line that there are no message if not. Tom -----Original Message----- From: T. Bradley Dean [mailto:[EMAIL PROTECTED]] No, Err.Number is 0 and Err.Description is blank. ~Brad -----Original Message----- From: David L. Penton [mailto:[EMAIL PROTECTED]] Check the errors collection. IIRC, PRINT statements will be there. -----Original Message----- From: T. Bradley Dean [mailto:[EMAIL PROTECTED]] I've created a SQL stored procedure that, instead of return a recordset, "Print"s out it's results. The problem is, I can't see these results anywhere but in the SQL Query Analyzer! I'm using ASP.net with VB.net code, I've tried doing a Scalar Command and also just a regular SQLDataReader, both return nothing. Any tips would be appreciated. Thanks, ~Brad --- You are currently subscribed to dotnet as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED] --------- Administrated by 15 Seconds : http://www.15Seconds.com List Archives/Search : http://local.15Seconds.com/search Subscription Information : http://www.15seconds.com/listserv.htm Advertising Information: http://www.internet.com/mediakit/
