Jump to content

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/225966-mssql-select-query-hang/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.