freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] Unable to connect to data source, SQL state S1000 in SQLConnect
- From: "James K. Lowden" <jklowden AT freetds.org>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] Unable to connect to data source, SQL state S1000 in SQLConnect
- Date: Mon, 20 Jun 2005 07:52:27 -0400
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] tdsodbc.h:26: sql.h: No such file or directory,
Baris Simsek, 06/20/2005
- <Possible follow-up(s)>
-
RE: [freetds] tdsodbc.h:26: sql.h: No such file or directory,
ZIGLIO, Frediano, VF-IT, 06/20/2005
-
[freetds] Unable to connect to data source, SQL state S1000 in SQLConnect,
Baris Simsek, 06/20/2005
- Re: [freetds] Unable to connect to data source, SQL state S1000 in SQLConnect, James K. Lowden, 06/20/2005
-
[freetds] Unable to connect to data source, SQL state S1000 in SQLConnect,
Baris Simsek, 06/20/2005
Archive powered by MHonArc 2.6.24.