|
| data loss problem |
 |
Mon, 17 Mar 2008 19:31:08 +000 |
Colleges,
We are facing with a data loss problem. The situation is:
A datareader is filled with data from a stored procedure and is loaded in a
datatable, the datatable is passed on the report viewer control and thus the
report displays.
The problem is that sometimes only a fragment of data is loaded in the report
that means if the total number of the data retrieved from the DB is 800 the data
displayed is 9 or 30…….
If we debug the code with the datareaderIDataReader dr =
command.ExecuteReader(CommandBehavior.CloseConnection);
And hover the mouse over the dr object we will notice that the ResultView
contains all of the 800 rows, hovering out and hovering in again will result
with Empty = "Enumeration yielded no results" under the Result view on
the dr object. Thus pressing f5 the report will result with 0 records.
So, in debug 0, in release sometimes N from M, sometimes all of them.
We are using Microsoft Reporting services 9.0.0.0 and MySql 5.2.1 .net
connector, which we upgraded from 5.0.7 with the hope that the problem will go
away.
Thanks in advance
|
| Post Reply
|
| Re: data loss problem |
 |
Mon, 24 Mar 2008 18:38:51 +000 |
We did resolve the problem....I would say instancing objects from the interface
class with mySQL constructors it's not a good idea. There is bad
interoperability with the mySQL connector thus.So what we did, we changed this
code: IDbConnection connection; IDbCommand command;
connection = newMySqlConnection(ConnectionStringMySql);
command = newMySqlCommand();with : MySqlCommand command;
MySqlConnection connection; connection =
newMySqlConnection(ConnectionStringMySql); command =
newMySqlCommand(); Also the method that was returning IDataReader now returns
MySQLDataReader and we avoided the Load() method with iterative reading/loading
data in the datatable.
|
| Post Reply
|
|
|
|
|
|
|
|
|
|