I am currently doing a project that connects to a mssql server and we finally got this sucker connected using a dsn and odbc_connect. I have the ability to call odbc_data_source and all other functions that query the server but I am having an issue with odbc_exec hanging. When I construct the query wrong, I get back a result saying that the query is wrong eg. table doesn't exist, error at from line 2, etc... However, any query that I do hangs. Even extremely simple ones get a timeout. I simplified it into a simple code base to show you an example:
$username = "blah";
$password = "blah2";
$connection = odbc_connect('myDSN', $username, $password);
$results = odbc_exec($connection,'Select TOP 1 firstnamemi from crname;');
running this code gets me the hourglass and after about 30 secs or so, a timeout message in the browser.