freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "ZIGLIO Frediano" <Frediano.Ziglio AT vodafone.com>
- To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
- Subject: RE: [freetds] New to FreeTDS / ODBC
- Date: Tue, 1 Jul 2003 17:46:47 +0200
>
> I am attempting to setup a Redhat Linux 9 box with PHP 4.2.2
> and Apache
> 2.0.40 to connect with a MSSQL server database using FreeTDS.
> This has
> been headache after headache.
>
> i am able to connect with tsql fine. My ODBC connection scripts from
> PHP on the other hand are a bit different...
>
> I am currently getting the following error:
> SQL error: [unixODBC]Client unable to establish connection, SQL state
> S1000 in SQLConnect in /var/www/html/rossmach/odbc_test.php
>
> the error is coming from this statement:
> $connection =
> odbc_connect("Driver=TDS;Server=192.168.0.3:1433;Database=ARMCODATA",
> "username", "password", "Integrated Security=NO") or
> die(odbc_error());
>
> My freetds.conf file contains this info for the DSN:
> [TDS]
> host = 192.168.0.3
> port = 1433
> tds version = 4.2
>
With freetds.conf you should use Servername, not Server option. Also you
have to compile odbcinst.ini for driver name. My odbcinst.ini (/etc)
contains
[FreeTDS]
Description = FreeTDS driver
Driver =
/home/fziglio/cpp/freetds/freetds/src/odbc/.libs/libtdsodbc.so
FileUsage = 1
So I can use connections like
odbc_connect("Driver={FreeTDS};Servername=TDS;Database=ARMCODATA",
"username", "password") (it should work)
freddy77
- RE: [freetds] New to FreeTDS / ODBC, ZIGLIO Frediano, 07/01/2003
Archive powered by MHonArc 2.6.24.