[2005] Conditional Compilation
I have a VB 2005 application that I need to compile differently based upon some parameters. This application is going to be run in 2 different branch offices with different servers. One of the things I would like to have conditional is ServerName. That way I don't have to create DSNs on the workstations.
Along with a few constants, I also want to conditionally compile the application's name and icon.
Any assistance would be greatly appreciated.
PS - I am using VB 2005 Express.
Re: [2005] Conditional Compilation
Try using #if
ex.
VB Code:
dim const a as integer=1
#if a=1 then
'Put your code when a=1
#else
'Put your code when a=another value
#end if
What you need is to change your constanta in order to work
Re: [2005] Conditional Compilation
Why not use a config file?
Re: [2005] Conditional Compilation
Creating #Const requires me to place them into the class that they will be used from. I would prefer to have a central place to hold all conditional arguments and then use #If statements.
I have never used a config file before. Do you have any examples? I will surf around and see what I can find.