if I call the same SQL 10 times, 2 times it is executed OK and 8 times it is executed with a random error.
C# code from Android application:
System.Data.DataTable DT;
DT = new DataTable();
NpgsqlCommand pgCommand = new NpgsqlCommand( SQL, pgConnection );
NpgsqlDataAdapter pgDataAdapter = new NpgsqlDataAdapter( pgCommand );
try
{
// with the same query (same SQL) - this will cause a random error (see below) or execution without error
pgDataAdapter.Fill( DT );
}
catch (PostgresException PE)
{
...
}
catch (Exception E)
{
// random error
}
The query is executed after pressing a button in the application.
This is the result:
- SELECT: OK
- EXCEPTION: The read on this field has not consumed all of its bytes (pos: 2, len: 536870915)
- SELECT: OK
- EXCEPTION: Index and count must refer to a location within the buffer. (Parameter 'bytes')
- EXCEPTION: The read on this field has not consumed all of its bytes (pos: 4, len: 131092)
- EXCEPTION: The read on this field has not consumed all of its bytes (pos: 4, len: 1028)
- EXCEPTION: The read on this field has not consumed all of its bytes (pos: 2, len: 2050)
- EXCEPTION: Unable to translate bytes [B0] at index 3 from specified code page to Unicode.
- EXCEPTION: Exception while reading form stream
- EXCEPTION: The read on this field has not consumed all of its bytes (pos: 8, len: 2097160)
- SELECT: OK
- EXCEPTION: The read on this field has not consumed all of its bytes (pos: 8, len: 65544)
- EXCEPTION: The read on this field has not consumed all of its bytes (pos: 4, len: 260)
- EXCEPTION: Reading as 'System.Object' is not supported for fields having DataTypeName '-.-'
- EXCEPTION: The read on this field has consumed all of its bytes and read into the subsequent bytes (pos: 4, len: -16843010)
- SELECT: OK
- FREEZE. (RESTART APPLICATION)
- EXCEPTION ....
- ....
SAME APPLICATION ON ZEBRA MC3300, Android v8.1 WORKS WITHOUT ANY EXCEPTION.
'SELECT' WORKS FINE ON PSQL.
NO ERRORS IN POSTGRESQL LOG.
if I call the same SQL 10 times, 2 times it is executed OK and 8 times it is executed with a random error.
C# code from Android application:
The query is executed after pressing a button in the application.
This is the result:
SAME APPLICATION ON ZEBRA MC3300, Android v8.1 WORKS WITHOUT ANY EXCEPTION.
'SELECT' WORKS FINE ON PSQL.
NO ERRORS IN POSTGRESQL LOG.