Dynamic Variable declaration
-
Hie guys. I want to know if it is possible to declare variables at runtime in VB. Here is the logic trying to be achieved: Say you have a variable that you want to create out of a value in a table and then use it later in code, is it possible? Example: Table containing names: Animal Height Weight Color ------ ------ ------ ----- Dog 40 30 Brown Cat 20 3 Black ....... Then in your code you want to create a variable out of an animal name. To do this you will have a recordset or dataset with the animal atributes as shown above. The objective is to end up having variable names based on the Animal field, accommodating for new animals to be added, at runtime. From the above rows, the runtime code should create variables strDog and strCat. If any other animal, say XX, is added the same code should be able to create a variable strXX. Is this possible? Help please.
Reuse! Buy If You Can! Build If You Must
-
Hie guys. I want to know if it is possible to declare variables at runtime in VB. Here is the logic trying to be achieved: Say you have a variable that you want to create out of a value in a table and then use it later in code, is it possible? Example: Table containing names: Animal Height Weight Color ------ ------ ------ ----- Dog 40 30 Brown Cat 20 3 Black ....... Then in your code you want to create a variable out of an animal name. To do this you will have a recordset or dataset with the animal atributes as shown above. The objective is to end up having variable names based on the Animal field, accommodating for new animals to be added, at runtime. From the above rows, the runtime code should create variables strDog and strCat. If any other animal, say XX, is added the same code should be able to create a variable strXX. Is this possible? Help please.
Reuse! Buy If You Can! Build If You Must
Chamu Matumbura wrote:
I want to know if it is possible to declare variables at runtime in VB.
No Still no Still no Answer aint gonna change in here!
xacc.ide
IronScheme - 1.0 beta 4 - out now!
((λ (x) `(,x ',x)) '(λ (x) `(,x ',x))) The Scheme Programming Language – Fourth Edition -
Hie guys. I want to know if it is possible to declare variables at runtime in VB. Here is the logic trying to be achieved: Say you have a variable that you want to create out of a value in a table and then use it later in code, is it possible? Example: Table containing names: Animal Height Weight Color ------ ------ ------ ----- Dog 40 30 Brown Cat 20 3 Black ....... Then in your code you want to create a variable out of an animal name. To do this you will have a recordset or dataset with the animal atributes as shown above. The objective is to end up having variable names based on the Animal field, accommodating for new animals to be added, at runtime. From the above rows, the runtime code should create variables strDog and strCat. If any other animal, say XX, is added the same code should be able to create a variable strXX. Is this possible? Help please.
Reuse! Buy If You Can! Build If You Must
1. Look up approx 2 inches 2. Read the notice that says "Please do not post programming questions here." [edit] it could be argued the VB isn't programming I suppose 3. Click the link next to it and post in the correct forum This forum is for people who are avoiding taking a break from work
-
Hie guys. I want to know if it is possible to declare variables at runtime in VB. Here is the logic trying to be achieved: Say you have a variable that you want to create out of a value in a table and then use it later in code, is it possible? Example: Table containing names: Animal Height Weight Color ------ ------ ------ ----- Dog 40 30 Brown Cat 20 3 Black ....... Then in your code you want to create a variable out of an animal name. To do this you will have a recordset or dataset with the animal atributes as shown above. The objective is to end up having variable names based on the Animal field, accommodating for new animals to be added, at runtime. From the above rows, the runtime code should create variables strDog and strCat. If any other animal, say XX, is added the same code should be able to create a variable strXX. Is this possible? Help please.
Reuse! Buy If You Can! Build If You Must
Wow, this isn't going to end well.
;-]
-
Wow, this isn't going to end well.
;-]
Are you using your high midichlorian count to help ascertain this? Or just a lucky guess? :)
¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow
-
Hie guys. I want to know if it is possible to declare variables at runtime in VB. Here is the logic trying to be achieved: Say you have a variable that you want to create out of a value in a table and then use it later in code, is it possible? Example: Table containing names: Animal Height Weight Color ------ ------ ------ ----- Dog 40 30 Brown Cat 20 3 Black ....... Then in your code you want to create a variable out of an animal name. To do this you will have a recordset or dataset with the animal atributes as shown above. The objective is to end up having variable names based on the Animal field, accommodating for new animals to be added, at runtime. From the above rows, the runtime code should create variables strDog and strCat. If any other animal, say XX, is added the same code should be able to create a variable strXX. Is this possible? Help please.
Reuse! Buy If You Can! Build If You Must
:laugh: :laugh: :laugh: :laugh: :laugh: :laugh: :laugh: :laugh: :laugh: :laugh: It's the way you tell 'em.
Software Kinetics (requires SL3 beta) - Moving software
-
Hie guys. I want to know if it is possible to declare variables at runtime in VB. Here is the logic trying to be achieved: Say you have a variable that you want to create out of a value in a table and then use it later in code, is it possible? Example: Table containing names: Animal Height Weight Color ------ ------ ------ ----- Dog 40 30 Brown Cat 20 3 Black ....... Then in your code you want to create a variable out of an animal name. To do this you will have a recordset or dataset with the animal atributes as shown above. The objective is to end up having variable names based on the Animal field, accommodating for new animals to be added, at runtime. From the above rows, the runtime code should create variables strDog and strCat. If any other animal, say XX, is added the same code should be able to create a variable strXX. Is this possible? Help please.
Reuse! Buy If You Can! Build If You Must
Flame on! If you cannot read why are you attempting to program?
------------------------------------ "Men may make bad decisions, immoral decisions or just plain wrong decisions, but at least they make decisions. Women on the other hand..." Patrick Kielty 2006
-
Are you using your high midichlorian count to help ascertain this? Or just a lucky guess? :)
¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow
I gotta bad feeling about this!
------------------------------------ "Men may make bad decisions, immoral decisions or just plain wrong decisions, but at least they make decisions. Women on the other hand..." Patrick Kielty 2006
-
Are you using your high midichlorian count to help ascertain this? Or just a lucky guess? :)
¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow
Just a wild stab in the dark but I'm feeling lucky!!
;-]
-
I gotta bad feeling about this!
------------------------------------ "Men may make bad decisions, immoral decisions or just plain wrong decisions, but at least they make decisions. Women on the other hand..." Patrick Kielty 2006
-
Hie guys. I want to know if it is possible to declare variables at runtime in VB. Here is the logic trying to be achieved: Say you have a variable that you want to create out of a value in a table and then use it later in code, is it possible? Example: Table containing names: Animal Height Weight Color ------ ------ ------ ----- Dog 40 30 Brown Cat 20 3 Black ....... Then in your code you want to create a variable out of an animal name. To do this you will have a recordset or dataset with the animal atributes as shown above. The objective is to end up having variable names based on the Animal field, accommodating for new animals to be added, at runtime. From the above rows, the runtime code should create variables strDog and strCat. If any other animal, say XX, is added the same code should be able to create a variable strXX. Is this possible? Help please.
Reuse! Buy If You Can! Build If You Must
Maybe I'm misunderstanding what you're trying to do, but use an array?
-
Hie guys. I want to know if it is possible to declare variables at runtime in VB. Here is the logic trying to be achieved: Say you have a variable that you want to create out of a value in a table and then use it later in code, is it possible? Example: Table containing names: Animal Height Weight Color ------ ------ ------ ----- Dog 40 30 Brown Cat 20 3 Black ....... Then in your code you want to create a variable out of an animal name. To do this you will have a recordset or dataset with the animal atributes as shown above. The objective is to end up having variable names based on the Animal field, accommodating for new animals to be added, at runtime. From the above rows, the runtime code should create variables strDog and strCat. If any other animal, say XX, is added the same code should be able to create a variable strXX. Is this possible? Help please.
Reuse! Buy If You Can! Build If You Must
-
Hie guys. I want to know if it is possible to declare variables at runtime in VB. Here is the logic trying to be achieved: Say you have a variable that you want to create out of a value in a table and then use it later in code, is it possible? Example: Table containing names: Animal Height Weight Color ------ ------ ------ ----- Dog 40 30 Brown Cat 20 3 Black ....... Then in your code you want to create a variable out of an animal name. To do this you will have a recordset or dataset with the animal atributes as shown above. The objective is to end up having variable names based on the Animal field, accommodating for new animals to be added, at runtime. From the above rows, the runtime code should create variables strDog and strCat. If any other animal, say XX, is added the same code should be able to create a variable strXX. Is this possible? Help please.
Reuse! Buy If You Can! Build If You Must
Use XML. That should solve the problem. ;) Marc
I'm not overthinking the problem, I just felt like I needed a small, unimportant, uninteresting rant! - Martin Hart Turner
-
Use XML. That should solve the problem. ;) Marc
I'm not overthinking the problem, I just felt like I needed a small, unimportant, uninteresting rant! - Martin Hart Turner
-
Use XML. That should solve the problem. ;) Marc
I'm not overthinking the problem, I just felt like I needed a small, unimportant, uninteresting rant! - Martin Hart Turner
Not liquid nitrogen? I hear that's useful... Iain.
I have now moved to Sweden for love (awwww). If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need cotract work done, give me a job! http://cv.imcsoft.co.uk/[^]
-
Hie guys. I want to know if it is possible to declare variables at runtime in VB. Here is the logic trying to be achieved: Say you have a variable that you want to create out of a value in a table and then use it later in code, is it possible? Example: Table containing names: Animal Height Weight Color ------ ------ ------ ----- Dog 40 30 Brown Cat 20 3 Black ....... Then in your code you want to create a variable out of an animal name. To do this you will have a recordset or dataset with the animal atributes as shown above. The objective is to end up having variable names based on the Animal field, accommodating for new animals to be added, at runtime. From the above rows, the runtime code should create variables strDog and strCat. If any other animal, say XX, is added the same code should be able to create a variable strXX. Is this possible? Help please.
Reuse! Buy If You Can! Build If You Must
The dog will eat the cat and the cow will jump over the moon