freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Gerry <gerry AT ship-to-order.com>
- To: freetds AT franklin.oit.unc.edu
- Subject: OT: easy? dblib question
- Date: Wed, 21 Mar 2001 16:34:50 -0700
I'm not too fluent with dblib or SQL Server so I was wondering if someone here might be able to help me out. I want to get the value returned by a stored procedure and can't figure out how to do it. Here is my attempt (which results in a segmentation fault at dbbind):
dbcmd(dbproc, "DECLARE @return_status FLOAT");
dbsqlexec(dbproc);
sprintf(sqlstr, "EXEC @return_status=sp_SendOrderToWMS @intInternalOrderId=%d", (int) orderid);
dbcmd(dbproc, sqlstr);
dbsqlexec(dbproc);
dbcmd(dbproc, "SELECT @return_status");
dbsqlexec(dbproc);
while ((return_code = dbresults(dbproc)) != NO_MORE_RESULTS) {
if (return_code == SUCCEED) {
dbbind(dbproc, 1, FLT8BIND, 0, (BYTE *) &return_status);
while (dbnextrow(dbproc) != NO_MORE_ROWS) {
printf("*** return_status = %d\n", (int) return_status);
}
}
}
Any help is greatly appreciated. BTW - I'm binding to floats because I had trouble binding to INTs elseware with FreeTDS.
Thanks,
Gerry
- OT: easy? dblib question, Gerry, 03/21/2001
Archive powered by MHonArc 2.6.24.