Re: get number of rows selected

Поиск
Список
Период
Сортировка
От VitaliyG
Тема Re: get number of rows selected
Дата
Msg-id 27851040.post@talk.nabble.com
обсуждение исходный текст
Ответ на get number of rows selected  ("Malm Paul" <paul.malm@saabgroup.com>)
Список pgsql-odbc


paul malm wrote:
>
>
> Hi,
> I dont know much about databases, and I have a question
>
> I've just installed PostgreSLQ.
> Now I would like to get the number of rows selected via a ODBC SQL
> statement in C++. I would like to know the amount before I do Fetch.
>
> This is a little example of what I do in c++:
>
>     selStr="select * from layer where visible = 1");
>     rc = SQLAllocHandle(SQL_HANDLE_STMT, ConHandle, &StmtHandle);
>     if(rc == SQL_SUCCESS)
>     {
>         SQLSetStmtOption(StmtHandle, SQL_CONCURRENCY,
> SQL_CONCUR_READ_ONLY);
>         SQLSetStmtOption(StmtHandle, SQL_CURSOR_TYPE,
> SQL_CURSOR_KEYSET_DRIVEN);
>         SQLSetStmtOption(StmtHandle, SQL_ROWSET_SIZE, m_rows);
>         rc = SQLExecDirect(StmtHandle, (SQLCHAR *)selStr,
> SQL_NTS);
> ...
> ...
> ...
> How do I know how many rows that was found??
>
>
> Kind regards,
>
> Paul Malm
>
>
>

Use SQLRowCount ODBC function

--
View this message in context: http://old.nabble.com/get-number-of-rows-selected-tp16475169p27851040.html
Sent from the PostgreSQL - odbc mailing list archive at Nabble.com.


В списке pgsql-odbc по дате отправления:

Предыдущее
От: Raymond O'Donnell
Дата:
Сообщение: Re: Facing Problem in DSN
Следующее
От: itishree sukla
Дата:
Сообщение: Facing Problem in DSN