The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:




Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Testing Tools >> HP Functional Testing / Mercury QuickTest Pro / QTP

kthomp
Junior Member


Reged: 02/17/05
Posts: 30
Loc: Raleigh, NC
Re: Can't retrieve record count in recordset
      11/27/06 07:41 AM

I have tried to used ReDim Preserve to resize the array each time a new record is read from the query results, and I get another error (subscript out of range).

This is the code I used:
' re-dim the array based on the size of the results table (number of fields)
ReDim preserve arrSQL(intRows, objRs.Fields.Count - 1)

This was placed inside the Do While loop, but before the For loop... intRows was incremented right after I moved to the next record.

I assume this is because I am only "allowed" to resize the last element (in this case the "columns").. but I need to add ROWS not COLUMNS to the array... is this thinking correct? Should I turn it around so that it is arrSQL(columns, rows) instead of (rows, columns), or is there an easier way? The way it is displayed in the app is (rows,columns)...

Post Extras Print Post   Remind Me!     Notify Moderator


Entire topic
Subject Posted by Posted on
* Can't retrieve record count in recordset kthomp 11/22/06 12:11 PM
. * * Re: Can't retrieve record count in recordset kthomp   11/22/06 12:15 PM
. * * Re: Can't retrieve record count in recordset kthomp   11/22/06 12:40 PM
. * * Re: Can't retrieve record count in recordset Tarun LalwaniModerator   11/22/06 01:44 PM
. * * Re: Can't retrieve record count in recordset Krishna_Manoharan   11/22/06 07:02 PM
. * * Re: Can't retrieve record count in recordset kthomp   11/27/06 05:20 AM
. * * Re: Can't retrieve record count in recordset kthomp   11/27/06 07:41 AM
. * * Re: Can't retrieve record count in recordset kthomp   11/27/06 10:25 AM

Extra information
0 registered and 74 anonymous users are browsing this forum.

Moderator:  IanFraser, Rajkumar_Rajangam, thorwath, TReddy, AJ, Tarun Lalwani, mwsrosso 



Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Thread views: 1769

Rate this thread

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5