Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple stored procedure with Query Analyzer
Message
 
 
To
18/05/2004 04:43:28
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Miscellaneous
Thread ID:
00904816
Message ID:
00904871
Views:
14
Hi Virusim,

There're a couple of problems with the statement that calls the store procedure:
- A store procedure can only return integer value. The system stored procedures return zero in case of success and nonzero in case of failure failure. It's good idea to follow this in your own stored procedures. See more on how to return values from stored procedures in Re: Can stored procedures return values? Message #876903.
- You've to use EXEC statement to invoke stored procedure
DECLARE @RESULT varchar(255), @rc int
@rc = EXEC CMSSP_UpdateRegAddress(3, '238164', '0', 'SOMERSET ROAD', 0, '111', 
               'SINGAPORE POWER BUILDING',0,0,0,0)
>
>I had this simple question on MS Sql2000 stored procedure.
>I had a stored procedure which my vfp application will called through ADO to execute it.
>
>Therefore, theoretically, I should be able to test the stored procedure using my own parameter as
>show below in the SQL Query Analyzer as show below, right ?
>
>DECLARE @RESULT varchar(255)
>exec @RESULT = CMSSP_UpdateRegAddress(3,'238164','0','SOMERSET ROAD',0,'111','SINGAPORE POWER BUILDING',0,0,0,0)
>
>However, I keep getting different type of errors.
>Am I using the wrong syntax.
>
>I hoping to use the Query Analyzer to test my input parameter.
>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform