Skip to Content.
Sympa Menu

freetds - [freetds] dbresults returning no res_info

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Kaveri, Ramesh" <ramesh.kaveri AT intel.com>
  • To: "'freetds AT lists.ibiblio.org'" <freetds AT lists.ibiblio.org>
  • Subject: [freetds] dbresults returning no res_info
  • Date: Tue, 10 Dec 2002 13:44:09 -0800

Hi all

I have a linux applications which dumps some data into MSSQL 7.0 through
FreeTDS. I have a problem with dbresults. The problem is - dbresults
returns no res_info. I am supposed to get num_cols as 1, but it returns as
0.

Here is the piece of code that I have:


if(*legosQuery)
{
if (dbcmd(dbproc,legosQuery) != SUCCEED) {
printf("dbcmd failed\n");
}

if (dbsqlexec(dbproc) != SUCCEED)
{
printf("dbsqlexec failed\n");
}
printf("After dbsqlexec\n");

if (dbresults(dbproc) != FAIL) {
TDSRESULTINFO *ResInfo;
TDSSOCKET *Tds;
Tds = (TDSSOCKET*)dbproc->tds_socket;
ResInfo = Tds->res_info;
if(ResInfo)
printf (">numcols: %d \n",ResInfo->num_cols);

In this always ResInfo was false. The version of MSSQL is 7.0. I am using
freeTDS 0.53. I have the following environment variable set:

SYBASE /freeTDS/0.53
TDSVER 70
LD_LIBRARY_PATH

the environement is:
RedHat Linux 7.2 - Kernal 2.2.17-14

Has anybody experienced similar problem. Any suggesion / tips / solutions
are welcome

Thanks in advance

Ramesh Kaveri




Archive powered by MHonArc 2.6.24.

Top of Page