|
-
Oct 7th, 2001, 08:46 PM
#1
Thread Starter
Fanatic Member
out of memory runtime error... some suggestions?
hello,
i've sent a program to a friend to test out for me, but he gets a run time error 7 (out of memory) when he clicks on 2 certain things....
i've gone through the code where the error occurs with no luck, so i was hoping maybe someone could see if they can find some error that would cause such a memory leak... works just peachy for me, but not for him... and it ALWAYS happens for him , even after reboot, etc... so it must be my code 
here's the code when the button is clicked:
VB Code:
If Not IsConnection Then
Call CreateConnection(DBCONNECTIONS)
End If
WebBrowse.Visible = False
Call UnloadSubForms
Load frmBrowse
SetParent frmBrowse.hWnd, fraMain.hWnd
frmBrowse.Show
here's the public functions i made that are called:
VB Code:
'sub to close a global connection
Public Function CloseConnection()
If objConn Is Nothing Then
'is nothing
Else
objConn.Close
Set objConn = Nothing
End If
End Function
'sub to see if connection exists
Public Function IsConnection()
If objConn Is Nothing Then
IsConnection = False
Else
IsConnection = True
End If
End Function
...
last but not least, here's the code on the form's load that is loaded ...
VB Code:
'delcare variables
Dim objRS As New ADODB.Recordset
'disenable view button
cmdView.Enabled = False
'open recordset
Set objRS = New ADODB.Recordset
objRS.Open "SELECT program FROM programs ORDER by program", objConn, 1, 3
'loop through recordset
Do Until objRS.EOF
'add program name to list
cmbProgram.AddItem objRS("program")
objRS.MoveNext
Loop
'close recordset
objRS.Close
Set objRS = Nothing
now, when he clicks on another button that also uses the set parent function, it works fine, so im assuming that function has nothing to do with my problem......
appreciate the help!
-
Oct 7th, 2001, 08:51 PM
#2
Frenzied Member
-
Oct 8th, 2001, 01:46 PM
#3
Thread Starter
Fanatic Member
well like i said, i have no problems with the program, but my friend does...... if it's not working after a nice fresh reboot with 384 mb ram, i think others might have problems as well..
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
|