freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Thompson, Bill D (London)" <ThompBil AT exchange.uk.ml.com>
- To: "'FreeTDS Development Group'" <freetds AT lists.ibiblio.org>
- Subject: RE: [freetds] Stored procedure output
- Date: Mon, 4 Aug 2003 13:10:58 +0100
Hi James,
It depends what you mean by output.
If your SP issues a select statement, then the results of the select should
be no different from any other select, a TDS_ROWFMT_RESULT followed by
TDS_ROW_RESULT.
You may well get some token types which you are not currently handling
though.
You'll get a TDS_STATUS_RESULT with the return status of the SP, and you may
get some tokens if you have output parameters on the SP (TDS_PARAM_RESULT).
Look at the dblib or ctlib code to see how these could be handled -
src/dblib/dblib.c (dbresults) or src/ctlib/ct.c (ct_results)
Bill
> -----Original Message-----
> From: James Vanns [SMTP:jimv AT canterbury.ac.uk]
> Sent: 04 August 2003 13:06
> To: FreeTDS Development Group
> Subject: [freetds] Stored procedure output
>
> Hi all (again). I am wondering how to print the output of a stored
> procedure call using the FreeTDS API (not dblib or ctlib). It can
> process results from tables, views and functions but does nothing when
> executing an SP:
>
> exec sel_user 'username'.
>
> I know by looking at the tds dump file the data has come back across the
> wire. I am switching on the result type from tds_process_result tokens
> e.g.
>
> switch (resulttype) {
> case TDS_ROWFMT_RESULT:
> /* ... */
> break;
> case TDS_ROW_RESULT:
> /* ... */
> break;
> }
>
> Should there be something else for printing SP results?
>
> Like I said the code I have is printing everything else fine (apart from
> blobs but I'm not bothered about that at the moment).
>
> Any ideas?
>
> Regards
>
> Jim
>
> --
> James Vanns BSc (Hons) MCP
> Linux Systems Administrator
> Senior Software Engineer (Linux / C & C++)
> Canterbury Christ Church University College
> Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x24045370
>
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
-
[freetds] Stored procedure output,
James Vanns, 08/04/2003
- <Possible follow-up(s)>
- RE: [freetds] Stored procedure output, ZIGLIO Frediano, 08/04/2003
- RE: [freetds] Stored procedure output, Thompson, Bill D (London), 08/04/2003
Archive powered by MHonArc 2.6.24.