ODBiC Discussion Board

Stored Procedures

by Max Steiner, October 14, 2006 13:53

I saw a previous post about Stored Procedures (SQL SERVER) and the syntax.. But still can't seem to get this working..

I'm just trying a real simple example and can't get it to work. Here is my stored procedure:

CREATE PROCEDURE dbo.x_test @test_cnt int, @test_val char(1) output AS

if @test_cnt = 1 begin set @test_val = 'A' end else begin set @test_val = 'B' end When I run this stored procedure using Query Analyzer, it works fine using the following commands:

declare @y char(1) execute x_test 1,@y output print @y

However, when I try to run this in odbic using the following code, it doesn't work:

<!--SQL x_test 1,$y$ output--> $y$

Obviously, I'm expecting to receive an "A" in variable $y$. But I don't get anything back. Anyone else have any luck with this?


Post Your Reply:

E-mail  optional

HTTP Link: 
Link text: 


Copyright ©1997-2003, Roger Harris. All rights reserved.