mssql_connect sometimes returns FALSE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi There,

I've written a script to connect to SQL Server 2000 (SP3).  Most of the time
it connects, but sometimes I get a "Connect failed" message.  I am running
on Windows 2000 SP4.  The script is listed below.

<?php
    $rteConnection = mssql_connect("atlantis", "simon", "simon");

    if($rteConnection == FALSE)
    {
        echo "Connect failed ".strftime("%H:%M:%S
").mssql_get_last_message();
    }
    else
    {
        echo "Connected ".strftime("%H:%M:%S ".mssql_get_last_message());
        if(!mssql_close($rteConnection))
        {
            echo "Close Failed.";
        }
    }
    phpinfo();
?>

I can't seem to get any more error information.  Has anyone got a clue about
why the dbopen routines (in mssql) would fail intermittently.

Thanks,

 Robert

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux