paul malm wrote:
> 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,
> SQLSetStmtOption(StmtHandle, SQL_CURSOR_TYPE,
> SQLSetStmtOption(StmtHandle, SQL_ROWSET_SIZE, m_rows);
> rc = SQLExecDirect(StmtHandle, (SQLCHAR *)selStr,
> 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.
In response to
pgsql-odbc by date
|Next:||From: Jan-Peter Seifert||Date: 2010-03-12 12:23:26|
|Subject: PGAPI_DriverConnect fails if password contains semicolon|
|Previous:||From: Devrim GÜNDÜZ||Date: 2010-03-09 16:12:29|
|Subject: Re: Specifying pg_config path|