I dont understand where this error is coming from, and why! basically I have a filtering by a certain piece of information in the database, below once I call the merge I get this error.
It only happens when im process a large amount of files in the database, but if I process to files in the database via data , and want to do a filter once it get to the merge it blows up,
I dont understand why
Cannot perform '=' operation on System.String and System.Int32.
private void SetFilter()
{
Generic_DatatableBindingSource.Filter = TestOnly ? "IsTest = True" : "";
if (tpmsn.Length > 0)
{
AddFilter("TestPositionMSN = " + tpmsn);
}
if (uutmsn.Length > 0)
{
AddFilter("UutMSN = " + uutmsn);
}
}
private void AddFilter(string Filter)
{
if (Generic_DatatableBindingSource.Filter.Length == 0)
{
Generic_DatatableBindingSource.Filter = Filter;
}
else
{
Generic_DatatableBindingSource.Filter += " And " + Filter;
}
} // AddFilter(
this.genericDataSet.Generic_Datatable.Merge(databaseDataSet.Test_Datatable); it fails on this specific line
Loading
David SmithPosted Oct 3, 2010, 7:57 PM
private void SetFilter()
{
Generic_DatatableBindingSource.Filter = TestOnly ? "IsTest = True" : "";
if (tpmsn.Length > 0)
{
//AddFilter("TestPositionMSN = " + tpmsn); Incorrect
AddFilter("TestPositionMSN = '" + tpmsn + "'"); Correct
}
if (uutmsn.Length > 0)
{
//AddFilter("UutMSN = " + uutmsn); Incorrect
AddFilter("UutMSN = '" + uutmsn + "'"); Correct
}
}
Sam HobbsPosted Oct 1, 2010, 10:39 PM
Sam HobbsPosted Oct 1, 2010, 10:21 PM
David SmithPosted Oct 1, 2010, 9:40 PM
and try to view the report , the error pops up , but i view all its fine. I search the tables I had in the dataset and all types match . the only System.Int32 is the ID or EventID which is correct.
Everthing else is System.String
So its hard to determine
Sam HobbsPosted Oct 1, 2010, 8:05 PM