ADODB Recordset MaxRecords problem

Results 1 to 3 of 3

Thread: ADODB Recordset MaxRecords problem

  1. #1
    Matthew Picioccio Guest

    Default ADODB Recordset MaxRecords problem

    I&#039m hitting up an Access database through ADODB, using ASP. I set the MaxRecords as follows (vbScript):<BR><BR>Dim objRS<BR>Set objRS = Server.CreateObject("ADODB.Recordset")<BR>objRS.Ma xRecords = 5 &#039 for example<BR><BR>I have no problems otherwise (i.e. I actually get the data), but I get lots of records - the MaxRecords of 5 seems to have had no effect (when witnessed via a "while not objRS.EOF" loop). This obviously makes a big performance drag.<BR><BR>Any help would be appreciated!<BR><BR>Thanks for your time.<BR><BR>

  2. #2
    Nathen Guest

    Default RE: ADODB Recordset MaxRecords problem

    Why don&#039t you limit the records returned in your SQL statement instead?<BR><BR>In Access the syntax is:<BR>SELECT TOP 5 FieldName FROM Sometable<BR><BR>SQL Server syntax:<BR>SET ROWCOUNT 5<BR>SELECT FieldName FROM Sometable<BR>-- SET ROWCOUNT 0 ; This turns off the rowcount feature

  3. #3
    Matthew Picioccio Guest

    Default RE: ADODB Recordset MaxRecords problem

    That&#039s fine, and so is the kludge that I&#039m doing now... I&#039m just wondering why the recordset MaxRecords property isn&#039t functioning correctly. Is it Access? Am I missing something else?<BR><BR>Thanks for your time.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts