473,651 Members | 2,496 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Question re. global vars in a vb module, please

Hi. In a public module which I have named "MAIN.VB", I use something
like this:

Public g_strRequestors PIN As String
Public g_strWebSiteLan guage As String

Public g_dbtSettings_H eaderInfo As New DataTable
Public g_dbtGeneralInf o As New DataTable
Public g_dbtSettings_L ocations As New DataTable
Public g_dbtSettings_T argets As New DataTable
Public g_dbtSettings_F ooterInfo As New DataTable

etc.

In strRequestorsPI N I store the requestors PIN#, in g_dbtGeneralInf o
(which is a datatable) I store some other settings which are decided
by the user (the requestor) as he goes through the pages of the wizard-
like process I'm implementing, so if the site were used to order, say,
movie tickets, I would store "Alex" in strRequestorsPI N, and the pairs

"NumberOfTicket s", "7"
"PricePerTicket ", "12"
"DateOfShow ", 10/10/2007
etc.... you get the idea.

On the last page of the wizard I show a big table with all the
settings selected by the user, for confirmation. On approval, I send
an email to the 'Production' dept, with all that info, and I also
print a receipt. That's it.

My questions are:
1. Is storing that stuff in global variables, like in desktop
programming, a good idea ? Will these public vars belong to ALL users,
or only to one user ?
(I'm not sure, but I guess that they will apply ACROSS the whole app,
therefore for all users.)

If this is the case, then...
2. I can't use cookies or session states since I have NO control over
the user's privacy settings, so the only thing that's left is
cookieless sessions. Or.... is there an alternative ?

Thank you very much.
Alex.

Feb 5 '07 #1
0 949

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
22518
by: Krisztian Kepes | last post by:
Hi ! I want to create an module and I want to use some Global Constant in it. How to I create an global constant in module what is accessable in from other modules ? like this example: *** module dirs *** const Const_Up=1 const Const_Down=1
0
1351
by: Kepes Krisztian | last post by:
Hi ! How to access my module global vars ? Some applications I want to declare global vars (constants). But in the module I cannot access them: DEF_X=120
8
2069
by: Elaine Jackson | last post by:
I would like to be able to write a function f, which will live in a module M, and will call a function g, such that, when f is imported from M into the interpreter, and invoked there, its invokation of g will return the interpreter's global namespace. Is there a way to do this and, if so, how? Muchas gracias for any and all assistance. Peace
18
1385
by: fred.dixon | last post by:
i have read the book and searched the group too ---------------------------------------------- im not gettin it. i want to read a global (OPTIONS) from file1 from a class method (func1) in file2 i want to understand how this works. ---------------------------------------------- #file1.py
6
2021
by: flamesrock | last post by:
ok, so to my knowledge, object oriented means splitting something into the simplest number of parts and going from there. But the question is- when is it enough? For example I have the following code: #def put_file(file_id, delete=False): # """ Function to put the file on the FTP Server # """ # print " FTP for this file started"
33
3034
by: MLH | last post by:
I've read some posts indicating that having tons of GV's in an Access app is a bad idea. Personally, I love GVs and I use them (possibly abuse them) all the time for everything imaginable - have been for years. If the machine has memory to spare and windows can use it - I'm thinking "Why not?" I was wondering what some of you have to say about that, particularly any severe "gotchas" you've had the unfortunate experience to contend with.
9
8644
by: CDMAPoster | last post by:
About a year ago there was a thread about the use of global variables in A97: http://groups.google.com/group/comp.databases.ms-access/browse_frm/thread/fedc837a5aeb6157 Best Practices by Kang Su Gatlin, casual mention was made about using static variables as an alternative to using global variables. This caused me to think of the following: '-----Begin module code
4
1749
by: pcaisse | last post by:
I'm having issues sharing global variables with Explorer. This problem probably has a simple answer (as with most newbie questions). The script.pl file: #!/usr/bin/perl -w use strict; use diagnostics; use sigtrap;
0
1436
by: Gary Herron | last post by:
Jacob Davis wrote: Yuck, YUCK, YUCK! You are breaking *so* many good-programming-practices, I hardly know where to start. First off: A python global is not what you think. There are *no* program wide globals. There are only module wide globals. Also, the "global isglobal" is absolutely meaningless as anything declared there is a (module level) global by definition.
0
8352
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8802
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8579
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7297
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5612
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4144
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2699
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1587
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.