Re: Connection String Help

From: Peter Rilling (peter_at_nospam.rilling.net)
Date: 02/10/05


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



Relevant Pages

  • Re: OLE DB connection string in SharePoint for Sybase ASA
    ... I wen to the Sybase site and found a reference to Connection String ... > where I WANT it to say Database Connections. ... > and up pops a Data Source Properties Window. ... > Server Error: An error occurred while retrieving the list of Databases ...
    (microsoft.public.frontpage.client)
  • Re: DBIx::DBH - Perl extension for simplifying database connectio ns
    ... Only one of the Informix notations has a host name in it, ... that's technically not a host name but a server name - the distinction ... under the illusion that people who use Perl to access a database know ... The connection string is system-specific -- end of sob story. ...
    (perl.dbi.users)
  • Re: help with changing some code from mdb to adp
    ... At the end of this post is an example of an ADO connection string to a SQL ... Server database, and '' to the UNC path/name of your instance of SQL ... Windows, you can't create a new UDL file directly, but you can create a new, ...
    (microsoft.public.access.adp.sqlserver)
  • RE: vb6 app no longer connects to Access DB on Term Server 2003
    ... we recently upgraded the Terminal Server from the 2000 version to ... we have tried simplifying the connection string by removing the ... Microsoft ActiveX Data Objects 2.8 Library ... We even tried it on Windows Server 2003 ...
    (microsoft.public.data.oledb)
  • Re: problems with my web application
    ... An application error occurred on the server. ... This <customErrors> tag should then have its ... connection string is registered in web.config. ...
    (microsoft.public.dotnet.csharp.general)