Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Removing Hard Code Paths in the Data Caption Property
Message
 
To
27/09/1999 15:03:09
General information
Forum:
Visual Basic
Category:
Other
Miscellaneous
Thread ID:
00269341
Message ID:
00269558
Views:
23
>Hi there!
>
>I want to use a variable (defined in main procedure) in the properties of an object.
>
>E.g.
>I have a dataset (object) in a Form.
>
>I want the properties of that object i.e
>
>DatabaseName to have as value a variable that has been defined in my main module.
>
>The variable drives a path name from an Ini file. So far it's Ok.
>
>But I'm not able to pass the value of this variable(which now contains the path) to the property DatabaseName.
>
>Is it possible to give as value a variable name in the DatabaseName property ?
>
>Or I'm compelled to give the path itself as value in the property ?
>
>Thx.
>Akshay

You have to do it the way I just wrote in my last message, ie:
data1.DatabaseName = YourVariable
data1.Refresh

You can't put your variable name in the properties of the object. The reason is that things that are in the properties are compiled and therefore need to be constant. If you variable (your case), you have to assigned it at design time just like the sample I give you.

Is it answering your question?
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform