Hello:
> It's not a big change and it's only useful in certain circumstances, but it
> *is* a better solution.
this is what the provider is doing right now ( i have checked it from
v2.5, but i think v2.0+ should be doing the same thing ):
private IPAddress GetIPAddress(string dataSource, AddressFamily
addressFamily)
{
try
{
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];
}
catch (Exception ex)
{
// If it's not possible to get the list of IP adress
associated to
// the Data Source we try to check if Data Source is
already an IP Address
// and return it
try
{
return IPAddress.Parse(dataSource);
}
catch
{
// In this case we want to rethrow the first exception
throw ex;
}
}
}
And the method is being called as:
IPAddress hostadd = this.GetIPAddress(this.dataSource,
AddressFamily.InterNetwork);
--
Best regards
Carlos Guzmán Álvarez
Vigo-Spain
-------------------------------------------------------------------------
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