473,465 Members | 1,962 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Declare Looping Variable

21 New Member
Hi,

I want to declare a variable outside a loop.
The variable then needs to change everytime it runs within the loop.
example:

DataRow name;

//Once in the for loop, the variable name must change to

name1 then name2, name3, name 4 and so on..

How do i do this?
Apr 23 '07 #1
2 1304
prabunewindia
199 New Member
try to use DataRow array
DataRow[] name=new Datarow[length];

Hi,

I want to declare a variable outside a loop.
The variable then needs to change everytime it runs within the loop.
example:

DataRow name;

//Once in the for loop, the variable name must change to

name1 then name2, name3, name 4 and so on..

How do i do this?
Apr 23 '07 #2
Frinavale
9,735 Recognized Expert Moderator Expert
Hi,

I want to declare a variable outside a loop.
The variable then needs to change everytime it runs within the loop.
example:

DataRow name;

//Once in the for loop, the variable name must change to

name1 then name2, name3, name 4 and so on..

How do i do this?
I'm not sure what language you're using.
I'm not exactly sure what you're trying to do

You could do something like:

Expand|Select|Wrap|Line Numbers
  1.      Dim name As String 
  2.      While (Not name = "something")
  3.          If (...) Then
  4.            name="something"
  5.          End IF
  6.       End While
  7.       txtName.Text = name
  8.  
Could you explain the problem a bit more?

-Frinny
Apr 23 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Ken Fine | last post by:
I'm trying to include a list of people that's the result of looping through a recordset in a CDONTS mail. I'm trying to Dim the output of a loop, and it ain't working -- I'm getting a syntax error....
45
by: Trevor Best | last post by:
I did a test once using a looping variable, first dimmed as Integer, then as Long. I found the Integer was quicker at looping. I knew this to be true back in the 16 bit days where the CPU's (80286)...
6
by: Michael | last post by:
Hi. I am trying to declare variables based on DB column. I have a table with 2 columns: "varname" and "varvalue". values for example: varName: 'varPhone' varValue: '450-111-2222' During the...
1
by: ares.lagae | last post by:
- I have a typelist and I want to declare a member variable for each of the types. How can I do that? E.g. I have the typelist "typedef boost::mpl::vector<int, float> types;" and I want to declare...
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.