D
David Wender
I have a strongly typed dataset and use the "FindBy.." function to
search for a particular record based on the Primary Key.
Generally, this works fine, but every once in a while, the find
function fails and will not work anymore. In other words, when
searching for a particular record, the FindBy function returns nothing
even though the record definitely still exists. I have included some
items from the Watch List below:
_dstMain.FuturesContracts.Rows.Count 428 Integer
DirectCast(_dstMain.FuturesContracts.Rows(273),FuturesDataset.FuturesContractsRow).FuturesCode "NG
" String
DirectCast(_dstMain.FuturesContracts.Rows(273),FuturesDataset.FuturesContractsRow).FuturesContract "U04
" String
_dstMain.FuturesContracts.FindByFuturesCodeFuturesContract("NG
", "U04 ") Nothing
As you can see, the dataset has 428 rows and row 273 contains the
values "NG " for FuturesCode and "U04 " for
FuturesContract. The function FindByFuturesCodeFuturesContract returns
Nothing even though I am searching for a row that exists. (I also
tried searching with the trailing spaces trimmed, but that did not
help.)
This table is being updated very often, though rows never get deleted
or added.
I also noted that the table in question seems to have 10 indexes. When
the failure occurs, it seems to have 12 indexes, many with errors. I
don't know where these extra indexes are coming from but I assume that
they are part of the problem.
Any help would be greatly appreciated.
Thanks.
Dave.
search for a particular record based on the Primary Key.
Generally, this works fine, but every once in a while, the find
function fails and will not work anymore. In other words, when
searching for a particular record, the FindBy function returns nothing
even though the record definitely still exists. I have included some
items from the Watch List below:
_dstMain.FuturesContracts.Rows.Count 428 Integer
DirectCast(_dstMain.FuturesContracts.Rows(273),FuturesDataset.FuturesContractsRow).FuturesCode "NG
" String
DirectCast(_dstMain.FuturesContracts.Rows(273),FuturesDataset.FuturesContractsRow).FuturesContract "U04
" String
_dstMain.FuturesContracts.FindByFuturesCodeFuturesContract("NG
", "U04 ") Nothing
As you can see, the dataset has 428 rows and row 273 contains the
values "NG " for FuturesCode and "U04 " for
FuturesContract. The function FindByFuturesCodeFuturesContract returns
Nothing even though I am searching for a row that exists. (I also
tried searching with the trailing spaces trimmed, but that did not
help.)
This table is being updated very often, though rows never get deleted
or added.
I also noted that the table in question seems to have 10 indexes. When
the failure occurs, it seems to have 12 indexes, many with errors. I
don't know where these extra indexes are coming from but I assume that
they are part of the problem.
Any help would be greatly appreciated.
Thanks.
Dave.