Solved

VB Code Error

Posted on 2004-04-30
13
783 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
LINQ return type for nested group query 6 74
VBA open file from excel cell 4 36
Access 2013 combo box not working 3 38
Add a task in Outlook from access 11 35
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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

867 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

23 Experts available now in Live!

Get 1:1 Help Now