Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Retrieving resultsets from oracle stored procedures via odbc
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_CHAR,
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);