Out of memory error in VB
Thu Oct 15 2009, 06:53 am
Hi I'm working on an SMS project. I have a problem that is I keep getting run-time error 7 which is says out of memory. When I go into debug mode it brings me to the line
strBuffer = StrConv(MSComm2.Input, vbUnicode). It occurs only occasionally and I have no idea why. I did clear strBuffer before I used it again. Funny thing is that I used this statement at many other places in my code but always seem to obtain the error at only a particular usage of it. Part of my code is:-
strBuffer = ""
Trace ("Reading message...")
MSComm2.Output = "AT+CMGR =" & msgIndex & vbCrLf
Sleep 500
strBuffer = StrConv(MSComm2.Input, vbUnicode)
Trace (strBuffer)
I reused this chunk of code at many areas of the code, only replacing the AT commands by other AT commands. Please help me solve the out of memory error. Thanks.
strBuffer = StrConv(MSComm2.Input, vbUnicode). It occurs only occasionally and I have no idea why. I did clear strBuffer before I used it again. Funny thing is that I used this statement at many other places in my code but always seem to obtain the error at only a particular usage of it. Part of my code is:-
strBuffer = ""
Trace ("Reading message...")
MSComm2.Output = "AT+CMGR =" & msgIndex & vbCrLf
Sleep 500
strBuffer = StrConv(MSComm2.Input, vbUnicode)
Trace (strBuffer)
I reused this chunk of code at many areas of the code, only replacing the AT commands by other AT commands. Please help me solve the out of memory error. Thanks.
Thu Oct 15 2009, 01:50 pm
try this:
recreate the whole project in a new folder with add the forms and other modules whatever you've created for this project to new folder. save the project and compile again. and see if that problem come back.
recreate the whole project in a new folder with add the forms and other modules whatever you've created for this project to new folder. save the project and compile again. and see if that problem come back.
Fri Oct 16 2009, 08:56 pm
This problem occurs generally coz of corrupted .vbp file.
try this maybe it helps:
support.microsoft.com/kb/241245
try this maybe it helps:
support.microsoft.com/kb/241245
Fri Oct 16 2009, 10:27 pm
I believe so...this is my code which I have the out of memory problem with...thanks...
Powered by e107 Forum System