Datasource enumerator cannot detect postgres servers
Posted: Wed 03 Sep 2008 20:30
I have used the following code to detect postgreql hosts on my lan, but datatable remains empty. It compiles fine.
When I use VS 2005 data connection wizard, I cannot detect any postgres server Hosts after scanning the network either. If I type in the correct server name, I can then connect just fine. This makes me think that postgresqldirect.net cannot auto detect postgres hosts.
I can use similar mssql code to detect mssql hosts on my lan.
Using postgresql v 8.2
Using postgresqldirect.net 3.70.28.0
Code: Select all
PgSqlDataSourceEnumerator instance = PgSqlDataSourceEnumerator.Instance;
DataTable dtSQLServers = instance.GetDataSources();
foreach (DataRow drServer in dtSQLServers.Rows)
{
String ServerName;
ServerName = drServer[0].ToString();
.....
}
I can use similar mssql code to detect mssql hosts on my lan.
Using postgresql v 8.2
Using postgresqldirect.net 3.70.28.0