ADONET64 vertica driver returns empty DataTable on Select count(*)
joergschaber
Vertica Customer ✭
Hi,
sometimes my ADONET64 vertica driver returns an empty DataTable, when I run a "Select count(*) from " a View.
The c# code is the following:
VerticaCommand command = _dbConnection.CreateCommand(); command.Connection = _dbConnection; command.CommandText = "SELECT COUNT(*) FROM View"; // Create the DataAdapter VerticaDataAdapter adapter = new VerticaDataAdapter {SelectCommand = command}; // Fill the DataTable DataTable result = new DataTable(); adapter.Fill(result);
After adapter.Fill(result)
result
should be a data table with one row, but sometimes it is just empty.
Any idea? Is that a bug in the driver?
vertica and driver version is v10.0.1-6
Tagged:
0
Best Answer
-
joergschaber Vertica Customer ✭
I think we found the problem. We figured that we probably had parallel queries using a async methods running the queries.
Thanks.0
Answers
Can you check to see if the query is reaching Vertica?
To do that, query the SYSTEMS tables.
Example...
Are there times whene the SUCCESS flag is false?
If so, take a peek at the DC_ERRORS Data Collector table for the related TRANSACTION_ID and STATEMENT_ID:
SELECT log_message FROM dc_errors WHERE transaction_id = 45035996274039952 AND statement_id = 1;
Hi,
yes, we checked and it seems that queries are not reaching Vertica and there are no queries with success = false.
This errors seems to occur, when we query data sets where count = 0 and/or we have several queries in a milliseconds time interval.