472,328 Members | 2,102 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,328 software developers and data experts.

quick question

my variables' data keeps getting trashed once a subroutine is exited, but their declared globally. its been a real pain in the ass having to work around that! is there some settings or something that i can change to prevent this immediate trashing? im not familiar with the garbage collector and how it works but, could the problem be in there?
Apr 9 '07 #1
4 1013
check if your variables declared new after exiting
Apr 11 '07 #2
check if your variables declared new after exiting
here's how i declare my global variables:
Dim iInterviewTotal, iStageTotal, iISTotal, iQuestionTotal, iGrandTotal As Integer

the only time i use new is:
Dim myCmd As New OleDbCommand(strSQLCommand, myConnection)

my instructor was stumped too
Apr 12 '07 #3
debug step by step and trace the error..may be something wrong in the subroutine..iam sorry if this didnt help you
Apr 14 '07 #4
So you're declaring these at the top of the page? Outside of any routines? You'll probably need to post more code to get some help.

One guess is that you're declaring the same variables again inside your routine. Reusing the same variable names locally and globally (or page-level as I'd call it in ASP) is legal and could cause the problem you describe.
Apr 14 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

by: tammygombez | last post by:
Hey everyone! I've been researching gaming laptops lately, and I must say, they can get pretty expensive. However, I've come across some great...
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.