Board index   FAQ   Search  
Register  Login
Board index php forum :: Database Other Database Engines

odbc_exec hangs

Do you have questions regarding other database enginges (not MySQL) -- ask here!

Moderators: macek, egami, gesf

odbc_exec hangs

Postby cpusl » Fri Jan 28, 2011 7:37 am

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?
cpusl
New php-forum User
New php-forum User
 
Posts: 1
Joined: Fri Jan 28, 2011 7:30 am

Return to Other Database Engines

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron