473,385 Members | 1,427 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.

Problem: public array loses elements (in usercontrol)

I have a public array (in a usercontrol) defined as:

Public arrWebServers(0) As WebServers

' FYI:
Public Structure WebServers
Friend ServerName As String
Friend MapIdAc As Short
Friend MapIdDc As Short
Friend DatabaseName As String
End Structure

In a sub called ArrayLoad I load the array with several elements (let's say
10). (FYI: Each time I add an element I do a ReDim Preserve on it and
increase it by 1.) I checked the array as it was loading and it indeed
loaded.

Later, when I call arrWebServers.GetUpperBound(0) (from another sub WITHIN
the usercontrol) it has NO ELEMENTS.

Ideas?
Nov 17 '05 #1
0 1365

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

Similar topics

3
by: Hannu Tiitu | last post by:
Hi! I have a small problem with array and objects: $a = new A(); $b = new A(); $c = new A(); $d = new A(); $e = new A(); $ar = array($a, $c, $d);
2
by: Dmitry | last post by:
Hello everyone, I have a really simple question here: I have a plain space delimited file that I want to read with WHILE loop 1 line at the time and process each input record as an array of...
8
by: Sowen | last post by:
Hi, I have an object "elem", there are only simple functions inside, like setName, getName, and three constructors Now I have another class "Base", need an array of elem to initialize class...
13
by: Ian Tuomi | last post by:
Could anyone please tell me what is wrong with this code? Compiler error is: "parse error before '.' token" in lines 13-16. I tried searching the internet but all the reference guides etc. say It's...
0
by: VB Programmer | last post by:
I have a public array (in a usercontrol) defined as: Public arrWebServers(0) As WebServers ' FYI: Public Structure WebServers Friend ServerName As String Friend MapIdAc As Short Friend...
2
by: Jan | last post by:
This is de public array I use, intline is a variable integer also declared as public in a module. I want to clear the content of the string array strOrderList in Form2, but i get a error in form1....
3
by: DumRat | last post by:
Hi, How can I return an array of elements from a function? ex. Function() { int array = { values };
5
by: Ranmini | last post by:
Dear prob solver, i have a problem with array lists. i am using array lists for adding objects. i just want to know, when you are adding an object to an arraylist whats the value u pass to the...
4
by: p4willi | last post by:
I have declared a public array and from several sub forms it builds the array. After I press the Save button on my main form, I wish to reset the array to have nothing in it (i.e all the elements are...
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: 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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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.