these are not the real values
$strServerName = "servername";
$strUsername = "username";
$strPassword = "password";
$strDatabaseName = "[databasename]";
$strODBCConName = "ODBCConnectionname";
$connection_string = "DRIVER={SQL Server};SERVER=$strServerName ;DATABASE=$strDatabaseName ";
if ($conn = odbc_connect( $connection_string, $strUsername , $strPassword ))
{
echo "Connected<br>";
$sql = "SELECT * FROM con_Contact";
$exc = odbc_exec($conn,$sql);
if($exc)
{
echo "selection completed<br>";
while($row = odbc_fetch_object($exc))
{
echo $row->con_Name.' '.$row->con_Surname . "<br>";
echo "line<br>";
}
}
}
other attempt
if ($conn = odbc_connect($strODBCConName, $strUsername, strPassword))
{
echo "Connected<br>";
$sql = "SELECT * FROM con_Contact";
$exc = odbc_exec($conn,$sql);
if($exc)
{
echo "selection completed<br>";
while($row = odbc_fetch_object($exc))
{
echo $row->con_Name.' '.$row->con_Surname . "<br>";
echo "line<br>";
}
}
}
antoher try...
$connMSSQL = mssql_connect($strServerName, $strUsername, $strPassword) or die("Could not connect.");
I have tried a few other combinations, but it all seems out to kill my sanity... If you can see a bug, plz tell me, if you know anywhere that I can get a tutorial (for free) I will be even happier.
I have the php cfm file, and I have searched the php.net site as well.
Thanks in advance for any help
Atron Seige