SQL Stored Procedure

Just starting out? Need help? Post your questions and find answers here.
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

SQL Stored Procedure

Post 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 ?
dontmailme
Enthusiast
Enthusiast
Posts: 537
Joined: Wed Oct 29, 2003 10:35 am

Post 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......
Paid up PB User !
User avatar
HAnil
User
User
Posts: 87
Joined: Thu Feb 26, 2004 5:42 pm
Location: 28:58E 41:01N

Re: SQL Stored Procedure

Post by HAnil »

How did you solve this problem ?
I looked Microsoft site , but didn't find any solutions.
Thanks for share
PureBasic v5.22 LTS & Mac & Windows8
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Re: SQL Stored Procedure

Post by ABBKlaus »

i used srod´s perfect adomate for that kind of work ;-)

http://www.purebasic.fr/english/viewtopic.php?t=35141
User avatar
HAnil
User
User
Posts: 87
Joined: Thu Feb 26, 2004 5:42 pm
Location: 28:58E 41:01N

Re: SQL Stored Procedure

Post by HAnil »

ADOmate works, thanks.
PureBasic v5.22 LTS & Mac & Windows8
Post Reply