Variable Values

chuckca

New member
Joined
Mar 23, 2005
Messages
4
Programming Experience
Beginner
Hello,

I have a situation where my application pulls data from a text file. The data I am concerned about is locations(Cubicles, Offices, Hallways etc). The application needs to determine from the locations barcode where the locations are located within 3 Sites, 10 Buildings and up to 15 Departments. For instance I use the locations barcode, in a variable (strArea) and use that to determine the 3 items I need to determine:

VB.NET:
If strArea >= objInventory.Buildings(0, 1) And strArea <= objInventory.Buildings(0, 2) Then
			strBuilding = "6"

My question concerns the "ranges" and how to:
1.store them
2.allow the user to change them
3.pull the values from where I have stored them and use them in my application

I have implemented 3 methods for these and run into brick walls on all. I have stored the values in 3 tables in an Access DB and have no problem allowing the users to change the values with stored procedures but I am at a loss as to how to pull those values back without having to have a seperate SP for each possibility.

I have stored the values in an XML standalone document and have the same problem as with the database - how to pull individual values from the xml doc so that I can say something like

VB.NET:
If strArea >= strFirstBldg And strArea <= strLastBldg Then
			strBuilding = "6"

And finally I have stored the values in 3 arrays which result in the code above - I can easily run if then statements based on positions in an array. The problem with this one is that I don't know how to allow the user to change the values in the array at run time.
VB.NET:
Public Sites(,) As String = {{1, "HLL00026", "HLL00032"}, _
								{2, "HLL00033", "HLL00058"}, _
								{3, 0, 0}, _
								{4, 0, 0}, _
								{5, 0, 0}}

Any advice on these problems would be appreciated.
I think the final piece to bring all of this together would be to use a dataset from the database to fill a 2-dimensional array. Is that possible? I have googled and searched on MSDN and can find no mention of it.

Chuck
 
Hello again,

Never mind, I've spent all evening learning about XML - .SelectSingleNode, XPath, etc. to return single values from an XML document.

Chuck
 
Back
Top