I want to call to store procedure that run a SELECT in SQLServer and that has 4 input parameters, with SQLTools Pro in a program written in powerbasic. Store procedure is declared of the following form:
spo_buscarArticulo (@param1 Int, @param2 int, @param3 int, @param4 varchar(30))
The code that calls to store procedure is:
cmd = " exec spo_buscarArticulo 13,3,1, ' CANALETA' "
SQL_Stmt %SQL_STMT_IMMEDIATE, cmd$
IF SQL_ErrorPending THEN
lResult& = SQL_MsgBox (sql_errorQuickAll, %MSGBOX_OK)
ELSE
DO
SQL_Fetch %NEXT_ROW
IF SQL_EOD THEN EXIT LOOP
Fld (1) = SQL_ResColText (1)
.....
LOOP
END IF
But when doing the test of the program, does not give back anything to me. In what I am being mistaken, or perhaps I must use SQL_Bind ?.
Thanks for the aid that could give me
spo_buscarArticulo (@param1 Int, @param2 int, @param3 int, @param4 varchar(30))
The code that calls to store procedure is:
cmd = " exec spo_buscarArticulo 13,3,1, ' CANALETA' "
SQL_Stmt %SQL_STMT_IMMEDIATE, cmd$
IF SQL_ErrorPending THEN
lResult& = SQL_MsgBox (sql_errorQuickAll, %MSGBOX_OK)
ELSE
DO
SQL_Fetch %NEXT_ROW
IF SQL_EOD THEN EXIT LOOP
Fld (1) = SQL_ResColText (1)
.....
LOOP
END IF
But when doing the test of the program, does not give back anything to me. In what I am being mistaken, or perhaps I must use SQL_Bind ?.
Thanks for the aid that could give me
Comment