[prev in list] [next in list] [prev in thread] [next in thread]
List: freetds
Subject: Re: [freetds] Unable to connect to data source, SQL state S1000 in
From: "James K. Lowden" <jklowden () freetds ! org>
Date: 2005-06-20 11:52:27
Message-ID: 20050620075227.0de7fa70.jklowden () freetds ! org
[Download RAW message or body]
Baris Simsek wrote:
>
> lib paths are correct. i am not sure about port and tds version in
> freetds.conf. Am i in correct way? is there any other way?
...
> conn.php
> <?php
> $conn = odbc_connect('saster', 'admin', 'opass') or die("connect
> error!"); ?>
> Full error message of this code: *Warning*: odbc_connect(): SQL error:
> [unixODBC][FreeTDS][SQL Server]Unable to connect to data source, SQL
> state S1000 in SQLConnect in */usr/local/www/data-dist/odbc/conn.php* on
>
> line *3*
> connect error!
The User Guide is your intended resource. It's fine if you want to take
the Great Leap Forward and see if you can connect with a PHP script right
away, but when (not if) that doesn't work, you need to back up and be more
deliberate.
Check with tsql. Then use isql to verify your odbc.ini.
> [VXM]
> host=192.168.2.41
> port=1433
> tds version=8.0
> client charset = utf-8
This looks right for a default installation of SQL Server 2000, if
locale(1) indicates you're using UTF-8 on the PHP box. If those
assumptions are correct, I would espect tsql to work.
In odbc.ini, I think saster needs its Driver to point to the odbc library.
Cf.http://www.freetds.org/userguide/odbcombo.htm#E.G.SAMPLEODBCCOMBO.
HTH.
--jkl
_______________________________________________
FreeTDS mailing list
FreeTDS@lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic