Jump to content

Archived

This topic is now archived and is closed to further replies.

laxplayin24

check odbc ceonnection

Recommended Posts

I am trying to put in a condition to check and see if the odbc connection was successful but I can't get it to work.

[code]
$user = '';
$pass = '';
$conn = odbc_connect('server', $user, $pass );


if(!$conn)
{
    die("Connection Failed");
}
else
{    
    echo "Connection Established";
}
[/code]

But i keep gfetting this error message on the webpage

Warning: odbc_connect() [function.odbc-connect]: SQL error: [Viaserv][ODBC Driver]DG23155: Allocate error: TCP/IP socket error, RC=10060, Message=ETIMEDOUT., SQL state HY000 in SQLConnect in c:\Inetpub\wwwroot\test.php on line 4
Connection Failed:


Thanks for the help

Share this post


Link to post
Share on other sites

×

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.