ahmtech123
MIS
Hi I keep getting the error below when attempting to connect to a SQL 2000 database:
Warning: odbc_connect(): SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'., SQL state 28000 in SQLConnect in on line 3
Connection Failed:
My code
I think I have access to the DB because I can use SQL query analazyser and also when I create the DSN I use NT auth and have no problems.
What does the above error point to?
Thanks
Warning: odbc_connect(): SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'., SQL state 28000 in SQLConnect in on line 3
Connection Failed:
My code
Code:
<?php
//bes is the system dsn
$connect = odbc_connect('bes','myuserid','*****');
if (!$connect)
{exit("Connection Failed: " . $conn);}
$sql = "SELECT * FROM userconfig";
$rs = odbc_exec($conn, $sql);
odbc_fetch_row($rs);
$users=odbc_result($rs,"DisplayName");
echo $DisplayName;
$odbc_close($connect);
php?>
I think I have access to the DB because I can use SQL query analazyser and also when I create the DSN I use NT auth and have no problems.
What does the above error point to?
Thanks