473,385 Members | 1,855 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

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_strRequestorsPIN As String
Public g_strWebSiteLanguage As String

Public g_dbtSettings_HeaderInfo As New DataTable
Public g_dbtGeneralInfo As New DataTable
Public g_dbtSettings_Locations As New DataTable
Public g_dbtSettings_Targets As New DataTable
Public g_dbtSettings_FooterInfo As New DataTable

etc.

In strRequestorsPIN I store the requestors PIN#, in g_dbtGeneralInfo
(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 strRequestorsPIN, and the pairs

"NumberOfTickets", "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 939

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

Similar topics

9
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: ***...
0
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
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...
18
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...
6
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...
33
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...
9
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...
4
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...
0
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*...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.