|
-
Oct 30th, 2000, 10:58 AM
#1
Thread Starter
Lively Member
I am currently using the .GetRows method of the ADODB recordset to populate arrays. I am wondering if there is a way to populate the array directly somehow, so I do not have to use an ADO recordset. The reason for this is performance related. If this is possible would eliminating the recordset make the app faster? I have read that the recordsets can be memory hogs.
Thanks.
-
Oct 30th, 2000, 12:26 PM
#2
do you load your recordset's data from a database?
-
Oct 30th, 2000, 01:34 PM
#3
Thread Starter
Lively Member
Yes. I am loading it from SQL 7.0
-
Oct 30th, 2000, 07:56 PM
#4
as far as i know (which is not much), there is no decent way to retreive data from a database without using a recordset. if you need to return only a few values from your database, you could return values from a stored procedure, but for large amount of data (espacialy in n-tier apps) you will have to find different approaches to pass data between tiers.
- creating variant arrays via GetRows may seem somewhat easy, but be prepared to pay a performance penalty in a n-tier enviroment.
- GetString will at least reduce some overhead regarding network traffic.
- if you use ADO 2.5 or later, you could concider using XML to pass data between tiers + invest your time in the future.
- in many circumstancies property bags are a decent way to pass data between tiers.
- last but not least disconnected recordsets could be a decent option (as far as i read they should be more efficient then variant arrays still).
- in some cases UDTs together with LSet can efficiently be utilized to pass data (read Wrox Press: VB6 Business Objects).
good luck
Sascha
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|