> if (!IPAddress.TryParse(dataSource, out ipaddress))
> {
> return ipaddress;
> }
Should be:
if (IPAddress.TryParse(dataSource, out ipaddress))
{
return ipaddress;
}
Otherwise, great :-)
Dean.
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf
> Of Carlos Guzmán Álvarez
> Sent: Wednesday, 22 August 2007 12:30 AM
> Cc: [email protected]
> Subject: Re: [Firebird-net-provider] Connection problem from Win
>
> Hello:
>
> Sorry this way ;)
>
> private IPAddress GetIPAddress(string dataSource,
> AddressFamily
> addressFamily)
> {
> IPAddress ipaddress = null;
>
> if (!IPAddress.TryParse(dataSource, out ipaddress))
> {
> return ipaddress;
> }
>
> IPAddress[] addresses =
> Dns.GetHostEntry(dataSource).AddressList;
>
> // Try to avoid problems with IPV6 addresses
> foreach (IPAddress address in addresses)
> {
> if (address.AddressFamily == addressFamily)
> {
> return address;
> }
> }
>
> return addresses[0];
> }
>
>
> --
> Carlos Guzmán Álvarez
> Vigo-Spain
>
> Blog : http://carlosga.wordpress.com/
> FirebirdClient : http://www.firebirdsql.org/
> XMPP Client : http://code.google.com/p/xmppclient/
> ohloh : http://www.ohloh.net/accounts/4138
>
> -----------------------------------------------------------------------
> --
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Firebird-net-provider mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider