MATLAB: Do I get an error when calling FETCH with a SAS database in Database Toolbox 3.7 (R2010a)

Database Toolbox

When I execute "curs=fetch(curs)", I get the following error:
??? Java exception occurred:
java.sql.SQLException: [SAS][SAS ODBC Driver]Driver not capable
at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.SQLGetStmtOption(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcStatement.getStmtOption(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcStatement.getMaxRows(Unknown Source)
Error in ==> cursor.get at 38
v.RowLimit = getMaxRows(d.Statement);
Error in ==> cursor.fetch at 66
rowLimit = get(initialCursor,'Rowlimit');
I am connecting to a database with a fairly small amount of data, so I do not understand why I am getting a 'Rowlimit' error.

Best Answer

This issue is due to a limitation in the SAS driver. It requires a Rowlimit argument to the FETCH call. Executing
curs=fetch(curs,Inf)
will get all the records, since you are allowing the Rowlimit to be infinity.