Scenario: I've established a connection to a Sybase 11.5 database using SQLStringConnect(). Sybase 11.5 does not support the TOP clause. The connection is synchronous.
Goal: I want to specify the maximum number of records to be returned by SQLExec().
Attempts: I've tried adding [tt]set rowcount 5[/tt] in the first SQLExec call, then executing the SQLExec statement that SELECTs the records, with no affect (SET ROWCOUNT probably is batch-specific). I've tried various ways of concatenating the two statements together into a single statement, but the statement fails.
SQLSetProp() does not have a row limit setting, nor does it appear that ODBC has either.
Has anyone solved this?
Robert Bradley
Sr. DBA, some big company
cheap prints and oil paintings:
Goal: I want to specify the maximum number of records to be returned by SQLExec().
Attempts: I've tried adding [tt]set rowcount 5[/tt] in the first SQLExec call, then executing the SQLExec statement that SELECTs the records, with no affect (SET ROWCOUNT probably is batch-specific). I've tried various ways of concatenating the two statements together into a single statement, but the statement fails.
SQLSetProp() does not have a row limit setting, nor does it appear that ODBC has either.
Has anyone solved this?
Robert Bradley
Sr. DBA, some big company
cheap prints and oil paintings: