freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
SQL error: tds_connect failed, SQL state 08001 in SQLConnect
- From: "Torres, Fernando" <nando AT robynet.com.br>
- To: freetds AT franklin.oit.unc.edu
- Subject: SQL error: tds_connect failed, SQL state 08001 in SQLConnect
- Date: Tue, 11 Sep 2001 10:32:03 -0400
Hello All,
I'm using PHP compiled with Freetds + iodbc, and in my tests apache
returns the message: "SQL error: tds_connect failed, SQL state 08001 in
SQLConnect"
Above is my odbc.ini and my script.php
Any one can help me?
odbc.ini
--------------
[ODBC Data Sources]
SQLSERVER = ODBC Driver
[SQLSERVER]
Driver = /usr/local/freetds/lib/libtdsodbc.so
Description = ODBC Driver
Servername = 192.168.0.157
ServerType = SQLServer 7.0
FetchBufferSize = 99
UserName = name
PWD =
Database = mydb
ReadOnly = no
[Default]
Driver = /usr/local/freetds/lib/libtdsodbc.so
script.php
---------------
<?php
putenv("LD_LIBRARY_PATH=/usr/local/freetds/lib/libtdsodbc.so");
putenv("ODBCINSTINI=/etc/odbcinst.ini");
putenv("ODBCINI=/etc/odbc.ini");
$dsn="SQLSERVER"; // this is a valid DSN‚ can be tested in odbctest
$user="name";
$password="";
if ($conn_id=odbc_connect("$dsn","$user","")) {print "sucesso"; }
else { print "erro"; }
?>
- SQL error: tds_connect failed, SQL state 08001 in SQLConnect, Torres, Fernando, 09/11/2001
Archive powered by MHonArc 2.6.24.