Hi, all..
i'm currently doing a project, WinXP,Microsoft SQL Server,PHP5 and Apache.
i'm failed to connect my ODBC function, odbc_connect() to database since the database and my scripts are separeted, which inside two different machine but in same network area.
Below is my coding inside dbase.php file which try connect to database:
<?php
$ser="PC3";
$db="telepaper";
$user="sa";
$pass="";
$conn=odbc_connect("DRIVER=SQL Server;SERVER=".$ser.";UID=".$user.";PWD=".$pass.";DATABASE=".$db.";Address=".$ser.",1433","","");
if (!$conn)
{exit("Connection Failed: " . $conn);}
?>
Yet, i'm failed to connect to my database and following error ocurred:
"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/telepaper/Rep/dbase.php on line 9
Connection Failed: "
Does anyone knows what's going wrong?or any better idea to connect to it?
Any helps will be appreciated!! Please HELP!Thanks!! :bemused: