Page 1 of 1

PPC + wlan --> Connectionproblem

Posted: Wed 25 May 2005 10:44
by donnyriyadi
Hi,
I'm now trying to use pgsql DA on the CF.
If the Wlan connection is broken, and I cannot send any query anymore. What should I do, so that I can be connected automatically again ?
Thanks.

PPC + wlan --> Connectionproblem

Posted: Fri 27 May 2005 08:34
by Yuri
There is no way to connect automatically. You should reconnect after an exception has been thrown.

Code: Select all

try {
        pgSqlDataAdapter.Fill(dataSet, "Table");  // pgSqlDataAdapter.SelectCommand.Connection.State ==  ConnectionState.Open
        dataGrid.DataMember = "Table";

      }
      catch {
        pgSqlDataAdapter.SelectCommand.Connection.Open();
        pgSqlDataAdapter.Fill(dataSet, "Table");
        dataGrid.DataMember = "Table";
      }