freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] PHP, PDO dsn-less connection to MS-SQL 2008
- From: Andreas <maps.on AT gmx.net>
- To: freetds AT lists.ibiblio.org
- Subject: Re: [freetds] PHP, PDO dsn-less connection to MS-SQL 2008
- Date: Mon, 12 Dec 2011 01:32:14 +0100
Am 11.12.2011 15:37, schrieb Cesare Leonardi:
On 11/12/2011 08:14, Andreas wrote:This didn't work either at first but then I've got it working like this:
can someone help me with PHP, PDO dsn-less connection to MS-SQL 2008,This is the connection string i'm currently using to connect to MSSQL
please?
2000 with FreeTDS 0.91 and without any external conf file:
$dbDriver = "FreeTDS; TDS_Version=7.1; port=1433";
$dbh = new PDO("odbc:Driver=$dbDriver; Server=$serverFQDN;
Database=$dbName; Uid=$usr; Pwd=$pwd;");
$drv = "SQL Server; TDS_Version=8.2; Port=1433";
$dbh = new PDO( "odbc:Driver=$drv; Server=192.168.0.123; Database=xx; UID=yy; PWD=zz;" );
I tried "FreeTDS" as drivername earlier but it wouldn't work. Only now I figured out that OpenSuse registers the FreeTDS driver as "SQL Server".
Btw. is there a reason that ODBCConfig only offers TDS versions up to 7.0? AFAIK 8.0 is MSSQL 2005 so it's not really that new.
Thanks :)
-
[freetds] PHP, PDO dsn-less connection to MS-SQL 2008,
Andreas, 12/11/2011
-
Re: [freetds] PHP, PDO dsn-less connection to MS-SQL 2008,
Cesare Leonardi, 12/11/2011
-
Re: [freetds] PHP, PDO dsn-less connection to MS-SQL 2008,
Andreas, 12/11/2011
-
Re: [freetds] PHP, PDO dsn-less connection to MS-SQL 2008,
Randy Syring, 12/11/2011
- Re: [freetds] PHP, PDO dsn-less connection to MS-SQL 2008, Andreas, 12/11/2011
-
Re: [freetds] PHP, PDO dsn-less connection to MS-SQL 2008,
Randy Syring, 12/11/2011
-
Re: [freetds] PHP, PDO dsn-less connection to MS-SQL 2008,
Andreas, 12/11/2011
-
Re: [freetds] PHP, PDO dsn-less connection to MS-SQL 2008,
Cesare Leonardi, 12/11/2011
Archive powered by MHonArc 2.6.24.