msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ado/ole recordset running out of memory

 
Post new topic   Reply to topic    msvisual.com Forum Index -> OLE
Author Message
Supertree



Joined: 04 Oct 2007
Posts: 2

PostPosted: Tue Apr 05, 2005 8:01 pm    Post subject: ado/ole recordset running out of memory Reply with quote

Hi;

I have to write custom data integrity utilities comparing files with table
data.
I've found that looping through an ado recordset will cause memory problems
if it's a large recordset.

I'm using this sort of syntax:

adoRSdir = adocn.Execute(sSQL, lrecs)

Do Until adoRSdir.EOF = True
'this loop is running out of memory
Loop

How can you monitor if you're going to run out of memory?
What technique would be better other than narrowing the sql
querystring result set?

Thanks for your knowledge.

Best Regards;

Todd

Archived from group: microsoft>public>vb>ole
Back to top
View user's profile Send private message
Supertree



Joined: 04 Oct 2007
Posts: 2

PostPosted: Thu Apr 07, 2005 2:31 pm    Post subject: RE: ado/ole recordset running out of memory Reply with quote

This suggestion from Stephen Howe worked.

If same machine:
Same thing applies but now you are aware that your SQL request may cause
your database considerable overhead depending on complexity of request. I
would be tempted to do

adoRSdir.Open(SQLRequest,,,,) etc

Thanks for your responses:

"Supertree" wrote:

>
> Hi;
>
> I have to write custom data integrity utilities comparing files with table
> data.
> I've found that looping through an ado recordset will cause memory problems
> if it's a large recordset.
>
> I'm using this sort of syntax:
>
> adoRSdir = adocn.Execute(sSQL, lrecs)
>
> Do Until adoRSdir.EOF = True
> 'this loop is running out of memory
> Loop
>
> How can you monitor if you're going to run out of memory?
> What technique would be better other than narrowing the sql
> querystring result set?
>
> Thanks for your knowledge.
>
> Best Regards;
>
> Todd

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
VB exe using VC++ ActiveX control memory leaks I created a MFC Active X control with one dummy method which does nothing. And then I add this C++ ocx to Visual Basic exe as a component, drag it on the form. Lastly in my VB code I called this form's C++ Active control dummy method. I open VC++ MFC acti

how does a recordset work ? Hello All, My memory capacity is 384 MB and I have opened a DAO recordset that is larger than the capacity successfully. It has 900000 records. Each record contains 1000 characters. Though I have opend it successfully, but I still do not know how it works

Recordset.Sort I have a stored procedure with Order By as: CASE WHEN 2)) AS int)<50 then CAST(1 AS else CAST(0 AS end Why do I use this? It's because Pa

Reformatting a RecordSet Intentionally Cross-posted to maximize exposure. Okay, I have a very interesting question. My clients require a schedule in this format. Format Required 11 12 13 14 (these are dates) 1-2 O P P P (codes) 2-3 a b c d 3-4 4-5 5-6 (t

Not getting all records from RecordSet Hi All, i'm running a vba application using Ms Access. in my table, i'm having department ID same for 3 employees i need to get that id in an array i gave the code as value = 'value will record the count of Dept
Post new topic   Reply to topic    msvisual.com Forum Index -> OLE All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group