I've problem with connecting to a remote MSSQL database. I'm trying it with both ways mssql_connect() and odbc_connect() and every time a get same error.
For mssql_connect()
and for odbc_connect()Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: 192.168.1.100 in /var/www/localhost/htdocs/pokus.php on line 14
The script is:Warning: odbc_connect() [function.odbc-connect]: SQL error: [unixODBC][Driver Manager]Data source name not found, and no default driver specified, SQL state IM002 in SQLConnect in /var/www/localhost/htdocs/pokus.php on line 17
Code: Select all
<?php
$x = mssql_connect($server,$user,$psswd);
if(!$x) echo 'M:'.mssql_get_last_message();
odbc_connect("Driver={SQL Server Native Client 10.0};Server=$server;Database=$db;",$user,$psswd);
?>
Code: Select all
locale is "C"
locale charset is "ANSI_X3.4-1968"
Msg 20009, Level 9, State 0, Server OpenClient, Line 0
Server is unavailable or does not exist.
There was a problem connecting to the serverMany thanks for EVERY suggestion!