Re: Connection String Help
From: Peter Rilling (peter_at_nospam.rilling.net)
Date: 02/10/05
- Next message: Sam Kuehn: "LoadControl() and Constructor Parameters"
- Previous message: Scott Allen: "Re: Connection String Help"
- In reply to: IPGrunt: "Re: Connection String Help"
- Next in thread: Scott Allen: "Re: Connection String Help"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 10 Feb 2005 13:23:50 -0800
It might also be good if the connection string was passed into your objects
through the constructor or some method/property. That way the objects to
not know anything about the server and can actually run in environments that
are not running on the server such unit tests.
"IPGrunt" <me@privacy.net> wrote in message
news:Xns95F990F7286EFswiss127army001wrenc@130.133.1.4...
> "=?Utf-8?B?Sko=?=" <JJ@discussions.microsoft.com> confessed in
news:04882C36-
> 80AD-46E2-BB8A-A91FEE06E061@microsoft.com:
>
> > Hello,
> > I was wondering what the best way would be to dynamically determine and
> > store connection string information. What I mean by this is that I want
> the
> > application to user the servervariable to determine what location it is
> > running in and then dynamically assign a connection string value based
on
> > that location. I was planning on doing this from the codebehind pages
> which
> > works fine because I am able to use the response object to determin
where
> the
> > code is running but I am not sure what to do in a vb class file where I
> have
> > no access to server variables. Any Ideas???
> >
> >
> > THANKS
>
> Why don't you have access to the server object through current context?
(as
> in System.Web.HttpContext.Current.Session)
>
> -- ipgrunt
- Next message: Sam Kuehn: "LoadControl() and Constructor Parameters"
- Previous message: Scott Allen: "Re: Connection String Help"
- In reply to: IPGrunt: "Re: Connection String Help"
- Next in thread: Scott Allen: "Re: Connection String Help"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|