You didn't mention which OS this is on.
If it's Windows, there is another factor. The timeout in ODBC and OLEDB refer
to the time the server on the other end takes to
complete the operation. This is independent of the timeout set at the socket
layer. So, you could set the ODBC timeout to 10
seconds, but that doesn't change the socket timeout. It will still wait for
the 30 or 60 seconds, or whatever it is, before
abandoning the socket.
This is a Windows thing and has to do with the way they implemented sockets.
> -----Original Message-----
> From: iODBC Maintainer [mailto:[EMAIL PROTECTED]
> Sent: Thu, January 10, 2008 4:09 PM
> To: Gustavo Ramalho
> Cc: firstname.lastname@example.org
> Subject: Re: [PHP-DB] odbc_connect - urgent
> HI Gustavo,
> > Hi, im in serious problems.
> > First sorry for bad english.
> > Im try to connect with many servers to take some
> information, but when
> > one of those is offline my script in php is fails and not proced.
> > Did have any way to configure te odbc_connect timeout?? its
> take to many
> > time to resolve take site is off or online. Im try to ping
> the server
> > but sometimes the server of internet is not same the sql server.
> Unfortunately you cannot set the login timeout using the
> odbc_setoption ($conn, 1, 103 /*SQL_LOGIN_TIMEOUT*/, 30)
> since the current php odbc layer cannot handle setting connection
> parameters before making an actual connection.
> However most ODBC drivers do have some capabilities to adjust
> Which driver are you using to connect to sql server?
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php