setting rowcount via odbc  
Author Message
marciamcmahon





PostPosted: Top

SQL Server Developer >> setting rowcount via odbc

Hi
I'm trying to limit my result set by using SET ROWCOUNT N where N is my
desired number of rows. The program runs against SQLServer 2000. SQLProfiler
shows the following trace but the row count limit is not applied.






exec sp_unprepare 196




USR.LAST_NM, USR.TITLE_TX, USR.LOGIN_ID, USR.PASSWORD_TX, USR.USER_TYPE_CD,
USR.EFF_START_DT, USR.EFF_END_DT, USR.PARTITION_GROUP_NM, USR.LOCK_ID FROM
USERS USR ORDER BY USR.LAST_NM ASC, USR.FIRST_NM ASC'


For reasons difficult to describe I can not modify to use SELECT TOP syntax.
Is there a way to set the ROWCOUNT on the connection via the ODBC API so
that it will take effect on my statements executed over that connection?

SQL Server6