How to determine which environment in C#?

Great. Thanks, Jose. Much appreciated.
Linda
--- In vantage@yahoogroups.com, Jose Gomez <jose@...> wrote:
>
> You'll need to bring into your customizatino
>
> Epicor.Mfg.Core.Session.dll
> Epicor.Mfg.Core.BLConnectionPool
>
> Then this will get you what you need
>
> String[] environment = ((Session)oTrans.Session).AppServer.Split(':');
> MessageBox.Show(environment[2]);
>
> Depending on your version and environment you'll get either
> 9401 -Production Epicor 9.05
> 9421 - Test Epicor 9.05
> 9411 - Pilot Epicor 9.05
> 8301 - Production 8.03 etc..
>
>
>
>
>
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *
> *checkout my new blog <http://www.usdoingstuff.com> *
> *
> *T: 904.469.1524 mobile
> E: jose@...
> http://www.josecgomez.com
> <http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
> <http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
> <http://www.josecgomez.com/professional-resume/>
> <http://www.josecgomez.com/feed/>
> <http://www.usdoingstuff.com>
>
> *Quis custodiet ipsos custodes?*
>
>
>
> On Thu, Apr 19, 2012 at 7:36 AM, John Driggers <waffqle@...> wrote:
>
> > Change the company name and use that. "Test - My company". That's probably
> > the easiest way.
> > If that doesn't suit you, you can look up the appserver URL from the system
> > agent and use that. I want to say you can get this info from oTrans as
> > well, but I'm not totally sure on that one.
> >
> > On Wed, Apr 18, 2012 at 2:27 PM, Hyndman <hyndmaninc@...> wrote:
> >
> > > **
> > >
> > >
> > > E9.04.507a: I'm writing custom code and want to internally determine what
> > > environment the code is running in (Test, Live, Pilot). Is there any way
> > to
> > > do this? I need to be able to tell before accessing any Epicor SQL
> > tables.
> > >
> > >
> > >
> >
> >
> >
> > --
> > *John Driggers*
> > *High End Dev, System Design, Profit Drinking*
> > *
> > **:: 904.404.9233*
> > *:: waffqle@...*
> > *:: NO FAXES*
> >
> > *
> >
> > *
> >
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
> > ------------------------------------
> >
> > Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must
> > have already linked your email address to a yahoo id to enable access. )
> > (1) To access the Files Section of our Yahoo!Group for Report Builder and
> > Crystal Reports and other 'goodies', please goto:
> > http://groups.yahoo.com/group/vantage/files/.
> > (2) To search through old msg's goto:
> > http://groups.yahoo.com/group/vantage/messages
> > (3) To view links to Vendors that provide Vantage services goto:
> > http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
> >
> >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>
E9.04.507a: I'm writing custom code and want to internally determine what environment the code is running in (Test, Live, Pilot). Is there any way to do this? I need to be able to tell before accessing any Epicor SQL tables.
Change the company name and use that. "Test - My company". That's probably
the easiest way.
If that doesn't suit you, you can look up the appserver URL from the system
agent and use that. I want to say you can get this info from oTrans as
well, but I'm not totally sure on that one.

On Wed, Apr 18, 2012 at 2:27 PM, Hyndman <hyndmaninc@...> wrote:

> **
>
>
> E9.04.507a: I'm writing custom code and want to internally determine what
> environment the code is running in (Test, Live, Pilot). Is there any way to
> do this? I need to be able to tell before accessing any Epicor SQL tables.
>
>
>



--
*John Driggers*
*High End Dev, System Design, Profit Drinking*
*
**:: 904.404.9233*
*:: waffqle@...*
*:: NO FAXES*

*

*


[Non-text portions of this message have been removed]
You'll need to bring into your customizatino

Epicor.Mfg.Core.Session.dll
Epicor.Mfg.Core.BLConnectionPool

Then this will get you what you need

String[] environment = ((Session)oTrans.Session).AppServer.Split(':');
MessageBox.Show(environment[2]);

Depending on your version and environment you'll get either
9401 -Production Epicor 9.05
9421 - Test Epicor 9.05
9411 - Pilot Epicor 9.05
8301 - Production 8.03 etc..






*Jose C Gomez*
*Software Engineer*
*
*
*checkout my new blog <http://www.usdoingstuff.com> *
*
*T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com
<http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
<http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
<http://www.josecgomez.com/professional-resume/>
<http://www.josecgomez.com/feed/>
<http://www.usdoingstuff.com>

*Quis custodiet ipsos custodes?*



On Thu, Apr 19, 2012 at 7:36 AM, John Driggers <waffqle@...> wrote:

> Change the company name and use that. "Test - My company". That's probably
> the easiest way.
> If that doesn't suit you, you can look up the appserver URL from the system
> agent and use that. I want to say you can get this info from oTrans as
> well, but I'm not totally sure on that one.
>
> On Wed, Apr 18, 2012 at 2:27 PM, Hyndman <hyndmaninc@...> wrote:
>
> > **
> >
> >
> > E9.04.507a: I'm writing custom code and want to internally determine what
> > environment the code is running in (Test, Live, Pilot). Is there any way
> to
> > do this? I need to be able to tell before accessing any Epicor SQL
> tables.
> >
> >
> >
>
>
>
> --
> *John Driggers*
> *High End Dev, System Design, Profit Drinking*
> *
> **:: 904.404.9233*
> *:: waffqle@...*
> *:: NO FAXES*
>
> *
>
> *
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------------------
>
> Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must
> have already linked your email address to a yahoo id to enable access. )
> (1) To access the Files Section of our Yahoo!Group for Report Builder and
> Crystal Reports and other 'goodies', please goto:
> http://groups.yahoo.com/group/vantage/files/.
> (2) To search through old msg's goto:
> http://groups.yahoo.com/group/vantage/messages
> (3) To view links to Vendors that provide Vantage services goto:
> http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
>
>
>
>


[Non-text portions of this message have been removed]
I need to know before reading the company record (so I know which db). Can you tell me how to reference the appserver URL in C#?

--- In vantage@yahoogroups.com, John Driggers <waffqle@...> wrote:
>
> Change the company name and use that. "Test - My company". That's probably
> the easiest way.
> If that doesn't suit you, you can look up the appserver URL from the system
> agent and use that. I want to say you can get this info from oTrans as
> well, but I'm not totally sure on that one.
>
> On Wed, Apr 18, 2012 at 2:27 PM, Hyndman <hyndmaninc@...> wrote:
>
> > **
> >
> >
> > E9.04.507a: I'm writing custom code and want to internally determine what
> > environment the code is running in (Test, Live, Pilot). Is there any way to
> > do this? I need to be able to tell before accessing any Epicor SQL tables.
> >
> >
> >
>
>
>
> --
> *John Driggers*
> *High End Dev, System Design, Profit Drinking*
> *
> **:: 904.404.9233*
> *:: waffqle@...*
> *:: NO FAXES*
>
> *
>
> *
>
>
> [Non-text portions of this message have been removed]
>