Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Retrieving resultsets from oracle stored procedures via odbc

Re: Retrieving resultsets from oracle stored procedures via odbc

From: harp <hmetu_at_gmx.net>
Date: 8 Feb 2005 07:13:05 -0800
Message-ID: <1107875585.551677.216440@g14g2000cwa.googlegroups.com>


I have made the following changes:
I have delete these and recompiled successfully cnt NUMBER DEFAULT 1;
cnt = cnt + 1;

Also deleted this:
ret = SQLBindParameter(hstmt,0,SQL_PARAM_INPUT,SQL_C_CHAR,SQL_C_CH­AR,

sizeof(company),0,company.c_str(),0,&compId); ret = SQLBindParameter
And inside this statement
ret = SQLFetch(hstmt); // ret gives -1
while (ret != SQL_NO_DATA){

    SQLGetData(hstmt, 1, SQL_C_CHAR,

            firstname, sizeof(firstname), &firstnameId);     SQLGetData(hstmt, 2, SQL_C_CHAR,

        familyname, sizeof(familyname), &familynameId);     SQLGetData(hstmt, 3, SQL_C_CHAR, address,

        sizeof(address), &addressId);
     SQLGetData(hstmt, 4, SQL_C_CHAR, telno,
          sizeof(telno), &telnoId);
     result = result + "\r\n " + (AnsiString)firstname
           + "\t" + (AnsiString)familyname + "\t" +
          (AnsiString)address + "\t" + (AnsiString)telno;
     ShowMessage(result);
      ret = SQLFetch(hstmt);

  }
The ret in the while-statement delivers -1, it still enters the statement and gives out only the last row endless. I will appreciate your comments.
Harp Received on Tue Feb 08 2005 - 09:13:05 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US