ADODB RecordSet.MaxRecords
Posted in 1999
Topics: Connectivity: ODBC / JDBC / .NET
I'm running this code from an ASP on an Informix 5.x db on UNIX box, from NT4.0 , INFORMIX 3.30 32 bit ODBC, ADODB 2.1 Set DBConn = CreateInstance("ADODB.Connection") DBConn.CursorLocation = adUseClient DBConn.Open Env.GetConnectionString(logicalname) Set RS = CreateInstance("ADODB.RecordSet") RS.MaxRecords = LIST_MAXITEMS RS.Open sqlclause, DBConn The table contains 260 records, LIST_MAXITEMS = 200., the sqlclause would normally bring out all the records RS.RecordCount returns a value of 260!!! (The code was ported from an SQL Server environment where it worked fine) It seems to me that this is another Informix ODBC driver bug. Any clues or suggestions?
Informix 5.xx does not support limiting queries to <N> rows, indeed this feature does not appear until IDS 7.30 as the FIRST <n> clause! The ODBC driver is accepting the syntax but ignoring it since the engine cannot comply. Art S. Kagel Nigel Rowe wrote: > > I'm running this code from an ASP on an Informix 5.x db on UNIX box, from > NT4.0 , INFORMIX 3.30 32 bit ODBC, ADODB 2.1 > > Set DBConn = CreateInstance("ADODB.Connection") > > DBConn.CursorLocation = adUseClient > > DBConn.Open Env.GetConnectionString(logicalname) > > Set RS = CreateInstance("ADODB.RecordSet") > > RS.MaxRecords = LIST_MAXITEMS > > RS.Open sqlclause, DBConn > > The table contains 260 records, LIST_MAXITEMS = 200., the sqlclause would > normally bring out all the records > > RS.RecordCount returns a value of 260!!! > > (The code was ported from an SQL Server environment where it worked fine) > > It seems to me that this is another Informix ODBC driver bug. > > Any clues or suggestions?