freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "James K. Lowden" <jklowden AT freetds.org>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] Windows Question
- Date: Fri, 13 Apr 2007 23:44:09 -0400
Patrick Corbett wrote:
> I reference it in my PHP connection string the following
> way:
>
> $host = "server\instance";
> mssql_connect($host, $user, $pass);
>
> So... the question is can I use named instances...?
As stated previously, you can use the "instance" entry in freetds.conf.
That's one way.
I'm pretty sure you can use "instance\servername" with any FreeTDS
library. I know Frediano added it for ODBC
(http://www.freetds.org/userguide/odbcconnattr.htm) but istr it works
everywhere. I don't have a server to test with, but you could try bsqldb.
If it connects, PHP should be able to, too.
Take care to escape the '\' character if need be. In your example above,
you use double quotes. The PHP manual
(http://www.php.net/manual/en/language.types.string.php) says the
backslash needs to be escaped in double-quoted strings:
$host = "server\\instance";
mssql_connect($host, $user, $pass);
or
$host = 'server\instance';
mssql_connect($host, $user, $pass);
Tell us how it works out. I might need to add something to the User
Guide.
--jkl
-
[freetds] Windows Question,
Patrick Corbett, 04/12/2007
- Re: [freetds] Windows Question, James K. Lowden, 04/12/2007
- <Possible follow-up(s)>
-
Re: [freetds] Windows Question,
Frank M. Kromann, 04/12/2007
-
Re: [freetds] Windows Question,
James K. Lowden, 04/13/2007
-
Re: [freetds] Windows Question,
Patrick Corbett, 04/13/2007
-
Re: [freetds] Windows Question,
James K. Lowden, 04/13/2007
-
Re: [freetds] Windows Question,
ZIGLIO, Frediano, VF-IT, 04/16/2007
-
Re: [freetds] Windows Question,
Patrick Corbett, 04/16/2007
- Re: [freetds] Windows Question, Patrick Corbett, 04/16/2007
- Re: [freetds] Windows Question, Patrick Corbett, 04/16/2007
- Re: [freetds] Windows Question, Daniel Fazekas, 04/16/2007
-
Re: [freetds] Windows Question,
Patrick Corbett, 04/16/2007
-
Re: [freetds] Windows Question,
ZIGLIO, Frediano, VF-IT, 04/16/2007
-
Re: [freetds] Windows Question,
James K. Lowden, 04/13/2007
-
Re: [freetds] Windows Question,
Patrick Corbett, 04/13/2007
- Re: [freetds] Windows Question, Brian Bruns, 04/14/2007
-
Re: [freetds] Windows Question,
James K. Lowden, 04/13/2007
- Re: [freetds] Windows Question, Frank M. Kromann, 04/13/2007
Archive powered by MHonArc 2.6.24.