Calling a stored procedure from Universe BASIC -
03-19-2006
, 11:52 PM
Hi,
I am writing a Universe BASIC program that is using the BASIC SQL
Client Interface to query a SQL Server database using ODBC. Initially I
was simply using a SQL SELECT statement that returned two columns and
that worked fine. However things have become more complex and I have
now created a stored procedure. The problem is that I cannot retrieve
the columns generated by the stored procedure.
I have created a simple stored procedure for testing that simply
returns three rows that each contain two columns. A variable have been
bound to each column. I am looping through the result set and calling
SQLFetch() to retrieve each row. My program is looping the correct
number of times (3) but the variables that have been bound are being
populated with an empty string "" instead of the correct value. The
program works correctly if I change no code EXCEPT to make the
SQLPrepare() function prepare a simple SQL statement that does the same
as the stored procedure.
I can call the stored procedure from the Universe prompt and I get the
correct results.
Has anyone encountered this before? Does anyone have any ideas what my
problem could be?
Thanks,
Ben |