I have been asked by my client to use SQL Server for my php application (uggggh!). The name of the server is "2k-server", but I am not sure where to create the ODBC connection. Some of the docs state that all I need is

<?php

$connection_string = 'DRIVER={SQL Server};SERVER=2K-SERVER;DATABASE=Php_Test';

$user = 'sa';
$pass = 'MyPassword';

$connection = odbc_connect( $connection_string, $user, $pass );

?>

However that gives me an error:

Warning: SQL error: [unixODBC][Driver Manager]Data source name not found, and no default driver specified, SQL state IM002 in SQLConnect in /home/httpd/test/odbc/php/connect.php on line 8

Any suggestions on the best way to connect?

Todd

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to