Jump to content


Photo

check odbc ceonnection


  • Please log in to reply
1 reply to this topic

#1 laxplayin24

laxplayin24
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 02 June 2006 - 02:56 PM

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.

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


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

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

#2 laxplayin24

laxplayin24
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 06 June 2006 - 02:13 PM

Anyone have any ideas why I am getting this error message I still haven't solved the problem. Thanks




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users