PC Review


Reply
Thread Tools Rate Thread

Application Config File - Running a training and production system on the same exe

 
 
sridhar
Guest
Posts: n/a
 
      5th Aug 2003
you can you .INI files. More details
http://www.crtimmonsinc.com/Frontend...DesktopDefault
..aspx?tabid=1015.

>-----Original Message-----
>Dear All,
>
>We have a number of vb6 applications that are executed

with command
>line parameters to indicate the connection string to

use. This is
>obviously helpful since we can have one icon/zenworks

snapshot that
>lauches the training version and another that runs the

live version.
>In both cases the same executable is used - just

difference
>command-line arguments.
>
>I have recently come across the app.config file with

vb.net and have a
>basic understanding of what it's used for.
>
>Can someone please recommend me a technique to implement

the vb6
>functionality above without having to pass command-line

arguments? or
>would two setup projects be required, with two different

app.config
>files - one pointing to our training db and the other the

production
>db.
>
>Many Thanks in advance,
>
>Jan-Willem Wilson.
>.
>

 
Reply With Quote
 
 
 
 
Glenn Wilson
Guest
Posts: n/a
 
      6th Aug 2003
I would try to stay away from using the registry and or
ini files, and stick with XML or the app.config files.

For your problem how about having the default connections
for say the production system stored in the app config
file. and when the system is run from the command line
over ride the app.config files in the program.

For example the Test server is called test01 and
production is prod01. In the config file you would have
the database connection string connecting to the prod01
machine. then when the app runs with no command line args
it would use the prod01 machine. Now in the code
configure it to check if command line args were passed,
if they validate then override the reading of the
app.config and use command line args.

Glenn Wilson

>-----Original Message-----
>you can you .INI files. More details
>http://www.crtimmonsinc.com/Frontend...p/DesktopDefau

lt
>..aspx?tabid=1015.
>
>>-----Original Message-----
>>Dear All,
>>
>>We have a number of vb6 applications that are executed

>with command
>>line parameters to indicate the connection string to

>use. This is
>>obviously helpful since we can have one icon/zenworks

>snapshot that
>>lauches the training version and another that runs the

>live version.
>>In both cases the same executable is used - just

>difference
>>command-line arguments.
>>
>>I have recently come across the app.config file with

>vb.net and have a
>>basic understanding of what it's used for.
>>
>>Can someone please recommend me a technique to

implement
>the vb6
>>functionality above without having to pass command-line

>arguments? or
>>would two setup projects be required, with two

different
>app.config
>>files - one pointing to our training db and the other

the
>production
>>db.
>>
>>Many Thanks in advance,
>>
>>Jan-Willem Wilson.
>>.
>>

>.
>

 
Reply With Quote
 
PartyFears
Guest
Posts: n/a
 
      6th Aug 2003
Thanks,

Are you saying that it is still acceptable [within the .NET apps] to
pass command-line arguments? or is there another recommended approach?

I just thought that command arguments would be redundant with the
advent of the app.config files.

If command-line is OK, then we're fine to go with what you've
suggested, but will probably be more explicit in always providing an
argument. This will allow for multiple databases if and when they are
required.

Thanks Again,

Jan-Willem Wilson.

"Glenn Wilson" <(E-Mail Removed)> wrote in message news:<05b001c35bcd$405b62a0$(E-Mail Removed)>...
> I would try to stay away from using the registry and or
> ini files, and stick with XML or the app.config files.
>
> For your problem how about having the default connections
> for say the production system stored in the app config
> file. and when the system is run from the command line
> over ride the app.config files in the program.
>
> For example the Test server is called test01 and
> production is prod01. In the config file you would have
> the database connection string connecting to the prod01
> machine. then when the app runs with no command line args
> it would use the prod01 machine. Now in the code
> configure it to check if command line args were passed,
> if they validate then override the reading of the
> app.config and use command line args.
>
> Glenn Wilson
>
> >-----Original Message-----
> >you can you .INI files. More details
> >http://www.crtimmonsinc.com/Frontend...p/DesktopDefau

> lt
> >..aspx?tabid=1015.
> >
> >>-----Original Message-----
> >>Dear All,
> >>
> >>We have a number of vb6 applications that are executed

> with command
> >>line parameters to indicate the connection string to

> use. This is
> >>obviously helpful since we can have one icon/zenworks

> snapshot that
> >>lauches the training version and another that runs the

> live version.
> >>In both cases the same executable is used - just

> difference
> >>command-line arguments.
> >>
> >>I have recently come across the app.config file with

> vb.net and have a
> >>basic understanding of what it's used for.
> >>
> >>Can someone please recommend me a technique to

> implement
> the vb6
> >>functionality above without having to pass command-line

> arguments? or
> >>would two setup projects be required, with two

> different
> app.config
> >>files - one pointing to our training db and the other

> the
> production
> >>db.
> >>
> >>Many Thanks in advance,
> >>
> >>Jan-Willem Wilson.
> >>.
> >>

> >.
> >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
updating machine.config when application is running. trialproduct2004@yahoo.com Microsoft Dot NET Framework 2 12th Oct 2006 12:43 PM
Performance issues on production server running VS 2003 application delfincek28@gmail.com Microsoft ASP .NET 0 20th Sep 2006 07:29 AM
How to get the path on file system where an asp.net application is running???? Bob Rock Microsoft ASP .NET 1 14th Jun 2004 07:52 PM
Web.config for Production Mark Frishman Microsoft ASP .NET 2 31st Mar 2004 01:25 AM
What does Error message: 16 Bit Windows Subsystem: config.nt. The system file is not suitable for running MS_DOS and MS Windows applications? How can I correct this? =?Utf-8?B?cnN2cHJpY2hAc3lhaG9vLmNvbQ==?= Windows XP General 2 8th Feb 2004 12:37 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:45 AM.