Jump to content

check odbc ceonnection


laxplayin24

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
Link to comment
https://forums.phpfreaks.com/topic/11033-check-odbc-ceonnection/
Share on other sites

Archived

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

×
×
  • 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.