•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the VB.NET section within the Software Development category of DaniWeb, a massive community of 391,609 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,625 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our VB.NET advertiser:
Views: 339 | Replies: 1
![]() |
•
•
Join Date: Sep 2007
Posts: 59
Reputation:
Rep Power: 1
Solved Threads: 0
Lets say now i want to use Select Case For some purposes as shown below:
Here, i have two arrays, One is called strmac() and another one is mac().
strmac() is used to store the variable read from the database, it is used to read the Machine ID for example.
mac() is an array used to read the machine ID as well from the INI file.
For example, if lets say i want to loop through the database, first of all i need to go through the INI file first. If mac() has 3 elements of 123,134,144, then only these 3 machine ID will be selected when it read through the database.
Now;
The problem is, the code is very long because within each case, i still have many calculations and array which is used to store the count for each hour and it just follow some kind of format. And the size of mac() may changes time to time? Any concern to get it simpler? Thanks.....
Here, i have two arrays, One is called strmac() and another one is mac().
strmac() is used to store the variable read from the database, it is used to read the Machine ID for example.
mac() is an array used to read the machine ID as well from the INI file.
For example, if lets say i want to loop through the database, first of all i need to go through the INI file first. If mac() has 3 elements of 123,134,144, then only these 3 machine ID will be selected when it read through the database.
Now;
Do While Not rs.EOF() Select Case (strmac) Case " mac(0) " 'Split it to 24 hours so that i can get the quantity for each hour Case " mac(1) " 'Do whatever code here ......
The problem is, the code is very long because within each case, i still have many calculations and array which is used to store the count for each hour and it just follow some kind of format. And the size of mac() may changes time to time? Any concern to get it simpler? Thanks.....
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb VB.NET Marketplace
Similar Threads
- Contactless Card Reader problem (VB.NET)
- Array problem... (C)
- problem with calling a function (C++)
- Weird ASP/SQL Problem (ASP)
- Problem in passing parameters (Visual Basic 4 / 5 / 6)
- wav file problem (Visual Basic 4 / 5 / 6)
- Defining Variable problem (Visual Basic 4 / 5 / 6)
- Problem Downloading large files (ASP)
Other Threads in the VB.NET Forum
- Previous Thread: textbox validation
- Next Thread: Backup an access database


Linear Mode