question about sqlserver procedure

Difei Qi <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
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?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.