Rabu, 08 Mei 2013

[MS_AccessPros] Re: disappearing global variables

 

Onno

In addition to what John said, when I use globals in a development environment I test them when moving from one object to another just to make sure they are still okay. But because all my production applications are MDEs with error traps in every procedure, the globals do not reset and are very stable.

A table of values is a good idea and probably isn't that much slower than a global variable. You would just have to make sure to clear the table when the application first opens so you don't have the wrong values stored.

Regards,
Bill Mosca, Founder - MS_Access_Professionals
http://www.thatlldoit.com
Microsoft Office Access MVP
https://mvp.support.microsoft.com/profile=C4D9F5E7-BB03-4291-B816-64270730881E
My nothing-to-do-with-Access blog
http://wrmosca.wordpress.com

--- In MS_Access_Professionals@yahoogroups.com, "Onno Knol" <onno.knol@...> wrote:
>
> Dear Friends,
>
> In my MsAccess application I define a number of global variables, like paths where I want to store files.
> Now it sometimes happens that these gobal variables disappear somewhere in the process of working with the application. Then my files suddenly are stored on unexpected places like the root directory. What can be the cause? A memory leak? And more important, how can I trace where this happens? Until now it seems like a random phenomenon.
>
> Has anyone ever had this problem and how did you handle it? One alternative is to stop using global variables and read-write them to a database table called settings,but I think this will be slower.
>
> Any thoughts would help.
>
> Thanks, Onno Knol
>

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar