After further investigation the issue occurs mainly during the read event. The
command is set to the default of 200 fetches and it is when the reader performs
one of these fetches it fails. I should point out that when I run the code
over USB with ActiveSync there are no issues. This only ever occurs when I run
the software over a LAN.
I tried putting in a retry count and so that if the reader fails, I close the
reader and also cancel and dispose of the command. I then create a new
command, but when I create the reader I get a NullReference Exception. Here is
the pseudocode:
Loop {
Try {
FbCommand centralCmd = ((FbConnection)centralConn).CreateCommand();
FbDataReader reader = null;
centralCmd.Transaction = CentralTrans;
try {
centralCmd.CommandText = selectionSql;
reader = centralCmd.ExecuteReader();
}
catch (Exception e) {
reader.Close();
reader.Dispose();
centralCmd.Cancel();
centralCmd.Dispose();
continue;
}
Try {
while (reader.Read()) {
process
}
}
catch (Exception e) {
reader.Close();
reader.Dispose();
centralCmd.Cancel();
centralCmd.Dispose();
continue;
}
Break;
}
catch (Exception e) {
reader.Close();
reader.Dispose();
centralCmd.Cancel();
centralCmd.Dispose();
continue;
}
}
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider