Skip to Content.
Sympa Menu

freetds - CTLib Question

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Patrick Muldoon" <doon AT inoc.net>
  • To: <freetds AT franklin.oit.unc.edu>
  • Subject: CTLib Question
  • Date: Fri, 10 Aug 2001 12:30:03 -0400


I am reading the sybase docs, and trying to figure out how to figure out how
many rows are returned in a query (so I can allocate memory to hold them)

Here is what I am using which is bombing. Any ideas on what I should do, or
where else I can look for information ..

ret = ct_command(sqlcmd, CS_LANG_CMD, cmd->argv[1], CS_NULLTERM,
CS_UNUSED);
/* send the damn thing */
ret = ct_send(sqlcmd);
if(ret == CS_SUCCEED){
/* First we need to determine the number of rows & cols in the resultset
*/
ret = ct_res_info(sqlcmd, CS_NUMDATA, &fcount, CS_UNUSED,NULL);
ret = ct_res_info(sqlcmd, CS_ROW_COUNT, &rcount, CS_UNUSED,NULL);


Thanks,

Patrick




  • CTLib Question, Patrick Muldoon, 08/10/2001

Archive powered by MHonArc 2.6.24.

Top of Page