cpusl Posted January 28, 2011 Share Posted January 28, 2011 Hi guys, 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;'); odbc_close($connection); running this code gets me the hourglass and after about 30 secs or so, a timeout message in the browser. Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/225966-mssql-select-query-hang/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.