Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning VB.NET Databases
This is the forum to discuss the Wrox book Beginning VB.NET Databases by Thearon Willis; ISBN: 9780764568008
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning VB.NET Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Closed Thread
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 17th, 2005, 03:20 PM
Authorized User
Join Date: Feb 2005
Location: , SC, USA.
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Dataset to Array

Hello all,

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:

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

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.

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.


PS still learning a lot from the book!

  #2 (permalink)  
Old May 18th, 2005, 02:23 AM
Authorized User
Join Date: Feb 2005
Location: , SC, USA.
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts

Hello again,

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


Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Go from 2d Array to 1d array without defining type OneQuestion General .NET 1 January 10th, 2008 11:13 AM
Converting a untyped dataset to a typed dataset daphnean Visual Studio 2005 0 July 13th, 2006 01:16 AM
Passing php array values to javascript array gkrishna Pro PHP 0 November 6th, 2004 03:20 AM
Re: SQL Server dataset to ACCESS dataset dazzer ADO.NET 0 March 22nd, 2004 05:28 AM

All times are GMT -4. The time now is 05:52 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.