It has been a long time,  but I think I recall that while the maximum number
of nodes in a treeview is only limited by the amount of system memory that
there is a practical limit of around 32,000 because the index property in an
integer.  Are you perhaps exceeding that limit?  Or running out of memory
entirely on your win98 test machine.......   They usually have lots less
memory installed.  How many items are you adding to the treeview?

You are not setting the recordsets to Nothing.....  That would consume
memory
You open rst, rst2 ,rstCont but you only close 2 of these recordsets, again
a possible memory leak.


----- Original Message ----- 
From: "Arnold Marquez" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 18, 2004 9:17 PM
Subject: RE: [vbhelp] RUNTIME ERROR '6' OVERFLOW





Hi

Below is part of the code that produced the error. i did not experience this
error in
XP and 2000.  The error only appeares in windows 98.

This error give me a lot of confusion as it never happened before in my
previous
deployment of the program. (I use VB 6.0 with SP6, ComponentOne)

I would appreciate it very much if you could help me solve this problem as i
need to implement my system next week

thanks and best regards

Arnold





Private Sub Form_Load()

    Dim rstCont As New ADODB.Recordset
    Dim rst2 As New ADODB.Recordset

    Dim nodNew As Node

    Me.TreeView1.Nodes.Clear
    Set rst = cnn.Execute("SELECT * FROM qryDestBKS")
    If Not rst.EOF Then

        Me.TreeView1.ImageList = Me.ImageList1
        While Not rst.EOF
            Set rst2 = cnn.Execute("SELECT BKS.BKS_Date,
Count(BKS.BKS_DestCode) AS CountOfBKS_DestCode From BKS " & _
                  "Where (((BKS.BKS_DestCode) = '" & rst("DES_DestCode") &
"')) " & _
                  "GROUP BY BKS.BKS_Date " & _
                  "HAVING (((BKS.BKS_Date) Between #" & Format(Me.dtFrom,
"yyyy/mmm/dd") & "# And #" & Format(Me.dtTo, "yyyy/mmm/dd") & "#))")

            If Not rst2.EOF Then
                Me.TreeView1.Nodes.Add , , rst("DES_DestCode"),
rst("DES_DestName"), "ClickOff", "ClickOn"
            End If

            rst.MoveNext
        Wend
         Me.TreeView1.Nodes.Add , , "LCL", "LCL", "ClickOff", "ClickOn"
         Me.TreeView1.Nodes.Add , , "FCL", "FCL", "ClickOff", "ClickOn"
         Me.TreeView1.Nodes.Add , , "COLOAD", "COLOAD", "ClickOff",
"ClickOn"
         Me.TreeView1.Nodes.Add , , "ALL", "ALL", "ClickOff", "ClickOn"
         Me.TreeView1.Nodes.Add , , "CONSOLE", "CONSOLE", "ClickOff",
"ClickOn"
    End If

    rstCont.Open "SELECT * FROM qryCSMonitoring_Containerize", cnn,
adOpenDynamic

    While Not rstCont.EOF
        'ERROR IN THIS AREA
        Me.TreeView1.Nodes.Add "CONSOLE", tvwChild, "B" &
rstCont("LSH_Key"), rstCont("LSH_Key") & ", " & rstCont("LSH_ShippingCode")
& ", " & rstCont("DES_DestName"), "ClickOff", "ClickOn"
                rstCont.MoveNext
    Wend

    ListView1.Sorted = True
    ListView1.FullRowSelect = True

    Me.Top = (Screen.Height - Me.Height) / 3
    Me.Left = (Screen.Width - Me.Width) / 2

    rst.Close
    rstCont.Close
End Sub

"Shawn K. Hall" <[EMAIL PROTECTED]> wrote:
Hi Arnold,

> (RUNTIME ERROR '6' OVERLOW). There is an instance that
> my program will be ok and after a series of data
> encoding this error would suddenly appear in the
> screen particularly when opening a report or a form
> with MS controls.

You need to review your code to see where the code is calling a
function from an event that reacts frequently (like a _mousemove or
timer with a low interval).

Ideally, you would have some method of watching the stack - like a
static variable in your re-entrant functions that is used as a
counter to deny requests to re-enter the routine after the stack
reaches a certain level.

Without seeing some code or at least an application process flow
diagram we're really at a loss to provide much actual assistance.

Regards,

Shawn K. Hall
http://ReliableAnswers.com/

'// ========================================================
    The shadow is what we think of it;
    the tree is the real thing.
      -- Abraham Lincoln (1809-1865)





'// =======================================================
    Rules : http://ReliableAnswers.com/List/Rules.asp
    Home  : http://groups.yahoo.com/group/vbHelp/
    =======================================================
    Post  : [EMAIL PROTECTED]
    Join  : [EMAIL PROTECTED]
    Leave : [EMAIL PROTECTED]
'// =======================================================



Yahoo! Groups SponsorADVERTISEMENT


---------------------------------
Yahoo! Groups Links

   To visit your group on the web, go to:
http://groups.yahoo.com/group/vbhelp/

   To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



---------------------------------
Do you Yahoo!?
 The all-new My Yahoo! - Get yours free!

[Non-text portions of this message have been removed]








'// =======================================================
    Rules : http://ReliableAnswers.com/List/Rules.asp
    Home  : http://groups.yahoo.com/group/vbHelp/
    =======================================================
    Post  : [EMAIL PROTECTED]
    Join  : [EMAIL PROTECTED]
    Leave : [EMAIL PROTECTED]
'// =======================================================

Yahoo! Groups Links









------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/k7folB/TM
--------------------------------------------------------------------~-> 


'// =======================================================
    Rules : http://ReliableAnswers.com/List/Rules.asp
    Home  : http://groups.yahoo.com/group/vbHelp/
    =======================================================
    Post  : [EMAIL PROTECTED]
    Join  : [EMAIL PROTECTED]
    Leave : [EMAIL PROTECTED]
'// =======================================================
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/vbhelp/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to