Page 1 of 1

SQL Stored Procedure

Posted: Wed Apr 14, 2004 4:46 pm
by ABBKlaus
Hi

i am currently working on a database that has stored procedures in it (MS-SQL Server) but i can´t get a result from it :

looks like this :

Code: Select all

DatabaseQuery("EXEC MyStoredProcedure123456789 'Serialnum1'")
the results should be like this:
Result1 (String)
.
.
.
Result36 (String)

Debug output sql.log:
PureBasic402875 304-228 ENTER SQLExecDirect
HSTMT 00881F88
UCHAR * 0x00B60048 [ 44] "EXEC MyStoredProcedure123456789 'Serialnum1'"
SDWORD 44

PureBasic402875 304-228 EXIT SQLExecDirect with return code 0 (SQL_SUCCESS)
HSTMT 00881F88
UCHAR * 0x00B60048 [ 44] "EXEC MyStoredProcedure123456789 'Serialnum1'"
SDWORD 44

PureBasic402875 304-228 ENTER SQLFetch
HSTMT 00881F88

PureBasic402875 304-228 EXIT SQLFetch with return code -1 (SQL_ERROR)
HSTMT 00881F88

DIAG [24000] [Microsoft][ODBC SQL Server Driver]Invalid cursor state (0)

Code: Select all

NEXTDATABASEROW()
seems not to work here :? (= 0)

do i have to youse WINAPI to get those results ?

Posted: Wed Apr 14, 2004 5:40 pm
by dontmailme
Did you look at the ODBC stuff on Microsofts site ??

http://msdn.microsoft.com/library/defau ... 0_7t2s.asp

It might help, although it depends on how the DB stuff in PB is coded......

Re: SQL Stored Procedure

Posted: Tue Apr 01, 2014 8:55 pm
by HAnil
How did you solve this problem ?
I looked Microsoft site , but didn't find any solutions.
Thanks for share

Re: SQL Stored Procedure

Posted: Tue Apr 01, 2014 9:17 pm
by ABBKlaus
i used srod´s perfect adomate for that kind of work ;-)

http://www.purebasic.fr/english/viewtopic.php?t=35141

Re: SQL Stored Procedure

Posted: Wed Apr 02, 2014 8:58 pm
by HAnil
ADOmate works, thanks.