Re: query analyser problems - novice question

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Vishal Parkar (REMOVE_THIS_vgparkar_at_yahoo.co.in)
Date: 08/18/04


Date: Wed, 18 Aug 2004 05:40:52 +0530

See following example.

--actual parameter below is not defined as output

create procedure test_proc @err nchar(200)
as
set @err = 'no error'
go

--while executing above procedure you are passing the parameter as output
parameter, which is not allowed.
declare @errmsg1 nchar(200)
exec test_proc @errmsg1 output

soln: alter procedure and define the parameter as output, above procedure
can be changed as

alter procedure test_proc @err nchar(200) output
as
set @err = 'no error'
go
declare @errmsg1 nchar(200)
exec test_proc @errmsg1 output
print @errmsg1

OR do not pass the parameter as an output parameter while executing the
procedure.

-- 
Vishal Parkar
vgparkar@yahoo.co.in | vgparkar@hotmail.com


Relevant Pages

  • Re: returning @@RowCount
    ... the SQL server allocates physical x chars, but uses only the size of my ... > alter procedure stp_Family ... > declare @Err int ...
    (microsoft.public.sqlserver.programming)
  • Re: Secrets to bypassing Hotmails junk folder
    ... Err... ... can run with various service providers (gmail, hotmail, etc.) and then ... executing those test cases against each and then publishing the ...
    (microsoft.public.dotnet.framework.aspnet)
  • teapot package: what is?
    ... can anyone tell me what I should be looking for in order to fix a: ... while executing ... err. ... on winodws? ...
    (comp.lang.tcl)
  • Re: teapot package: what is?
    ... while executing ... err. ... on winodws? ... ActiveState. ...
    (comp.lang.tcl)