Raiserror

Raiserror

Post by News » Wed, 21 Jun 2000 04:00:00



Should be straightforward,

 I want to return a variable in a message in a stored Proc.

 Is there any other way to return the variable in the message??

Thanks in advance.

Don.

 
 
 

Raiserror

Post by Andrew J. Kell » Wed, 21 Jun 2000 04:00:00


I don't know what you mean, but here is an example of how to use a variable
with Raiseerror:



    GOTO on_error

Andy


> Should be straightforward,

>  I want to return a variable in a message in a stored Proc.

>  Is there any other way to return the variable in the message??

> Thanks in advance.

> Don.


 
 
 

Raiserror

Post by News » Wed, 21 Jun 2000 04:00:00


What I need is to be able to concatenate onto the rasierror message string
as


is not excepted, is there another way?


>Should be straightforward,

> I want to return a variable in a message in a stored Proc.

> Is there any other way to return the variable in the message??

>Thanks in advance.

>Don.

 
 
 

Raiserror

Post by Doo » Wed, 21 Jun 2000 04:00:00


You can't concatenate a variable into the message string...but you can use a
variable alone.



don't.

NOTE: To surface a msg into an ASP page via ADO you must use a serverity of
11 - 18!


> Should be straightforward,

>  I want to return a variable in a message in a stored Proc.

>  Is there any other way to return the variable in the message??

> Thanks in advance.

> Don.

 
 
 

1. SQL2000 RAISERROR and SQL7 RAISERROR

In SQL 7 the following code will work, but in 2000 I get a syntax error when

where the problem is.   Anyone hear about different behavior for raiserror

level to 7.0 to no avail, plus I've tried to get a SQL7 client to compile on

a variable just prior to the raiserror call and pass the temporary variable

[begin code]
--drop procedure hyp_get_cubeid_p
create procedure hyp_get_cubeid_p



as

set nocount off
set concat_null_yields_null off


/* Initialize variables */

/* Get the cube id from the hyp_cubes_t table */

from hyp_cubes_t



 begin

  return
 end


 begin
  raiserror ('The Cube %s does not exist in the hyp_cubes_t table!',

  return
 end

return
[end of code]

--
Joe Vivona
Director, eCRM Application Development


2. Mail labels with PfW 4.5

3. raiserror -- what does ODBC driver gets.

4. Squeeze out more performance

5. Using bcp and RAISERROR for importing to SQL 7.0

6. Getting the query string in a trigger.

7. Howto: Use RAISERROR to cause a rollback when in XACT_ABORT mode

8. Limitation of DTS

9. Execute SQL Task and Raiserror

10. Help:Record is absent When calling RAISERROR in EventLog

11. RAISERROR is not catch as an Exception in the MFC

12. Access 2000 Project and RAISERROR()

13. RAISERROR or PRINT