Skip to Content.
Sympa Menu

freetds - [freetds] question about sqlserver procedure

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Difei Qi <fredericqi AT gmail.com>
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] question about sqlserver procedure
  • Date: Wed, 12 May 2010 08:40:08 +0800

hello, when I try to use stored procedure I meet an error when dbrpcsend.
I first use
"ret=dbrpcinit(dbprocess,"dbo.sp_select_student",DBRPCRECOMPILE);"
then " int inid=2;
ret =
dbrpcparam(dbprocess,"@id",(BYTE)0,SYBINT4,-1,-1,(BYTE *)&inid);"
the above ret is true,but when I use "ret=dbrpcsend(dbprocess);", it returns
FAIL, and I don't know where is the problem, can you help me ? many thanks.
Below is my sotred procedure:
create proc [dbo].[sp_select_student] @id int as
begin
select * from t_student where id=@id
end

Another question is that if I do not definite the return parameters in
stored procedure, just like the results of "select * from table_1",how can I
get the result row by row?



  • [freetds] question about sqlserver procedure, Difei Qi, 05/11/2010

Archive powered by MHonArc 2.6.24.

Top of Page