Solved

VB Code Error

Posted on 2004-04-30
13
782 Views
Last Modified: 2007-12-19
Hi,
VB send me error code number 30006
"Unable to alocate Memory for flexgrid"

do you know hot to solve that?...
the code is
"frmTabla.Tabla.rows = RecSet.CalculateStatistics("FeatureId").Count + 1"

do you know how to solve it..?
0
Comment
Question by:Iamme
  • 8
  • 5
13 Comments
 
LVL 8

Expert Comment

by:ampapa
ID: 10962481
0
 

Author Comment

by:Iamme
ID: 10963582
So, I can't use felx grid..??...
what do you think....?
0
 
LVL 8

Expert Comment

by:ampapa
ID: 10963813
How much information are you talking about, more than 350,00 records? If so then, no. I know that's not what you want to hear but you can't change that fact.

I would run a more specific query and try to be a little more precise as to what exactly you are looking for and what information should be displayed to the user.

0
 

Author Comment

by:Iamme
ID: 10964605
The problem is that I must take more than the limit, the problem uis that I'm not working with a typical system, I'm working with a geographycal system, and I hav an object that give me the pint of a map and some extra information .........it's because I must take more than 350,000....regs
0
 
LVL 8

Expert Comment

by:ampapa
ID: 10964701
Why not use a database control on your form? It will handle well more than 350K... or only show chunks of data at a time in your flexgrid with the user having the option to retrieve more?
0
 

Author Comment

by:Iamme
ID: 10978199
How can I do it . . . ? does flexgrid have a property that have the "Max containdes...."? or how can I do it...? I'm trying but I haven't find it......
Can you help me......?
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:Iamme
ID: 10980568
the problem is that I'm using the next code...

(           flexgrid       )   (                        My records                             )    
frmTabla.Tabla.rows = RecSet.CalculateStatistics("FeatureId").Count + 1

and recset  is like that
Dim RecSet As MapObjects2.Recordset

so, it isn't a single recordset....

how can i tell felxgrid that only receives n records....?
0
 

Author Comment

by:Iamme
ID: 10980572
I have increased the points.....
0
 
LVL 8

Accepted Solution

by:
ampapa earned 350 total points
ID: 10981570
This line alone will try to dictate the size of the Flexgrid based upon the count of records and will probably cause the error if the count is larger than can be handles by the FG:

"frmTabla.Tabla.rows = RecSet.CalculateStatistics("FeatureId").Count + 1"

As we previously discussed 350K is the limit. Do you specifically know how many recods you have and are dealing with?

I would loop throught the recordset that you've created to populate the FG and somehow you will have to determine where to cut it off.
Something like the following, where you start populating the FG based upon the current record and stop before you reach the Max for the Flexgrid.

DIM DBROW as Long

With RecSet
   Do until .EOF
     if DBROW < 345000 Then
         frmTabla.Tabla.rows = DBROW + 1
     end if
   Loop
end with


The real question I have is what are you planning to do with a FG that has 350K+ rows in it? It's not possible to look at them all and isn't really an effective tool at that quantity of information?
0
 

Author Comment

by:Iamme
ID: 10988221
ampapa

i'm working in this.....

I think that I can finish today......I'll give you the points..
but send a comment as an answer please....
0
 
LVL 8

Expert Comment

by:ampapa
ID: 10988779
I'm not quite sure what you mean? "send a comment as an answer please". I think you can accept any comment as an answer if that is what you are refering to.

Were you able to get your FG to work for you?
0
 

Author Comment

by:Iamme
ID: 10989225
I finish.....
0
 

Author Comment

by:Iamme
ID: 10989241
Thnks...
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now