=?Utf-8?B?UmFjaGVs?= <(E-Mail Removed)> wrote in
news:FC938CA3-E13F-4ACB-92E5-(E-Mail Removed):
> Hi All:
>
> I would like to know how to prevent a dataset from being filled with
> garbage data.
Don't select any garbage data
> Forinstance, if I am importing data from an excel spreadsheet into a
> dataadapter and the first column has data with decimal places and I do
> not want ANY data to go into the dataset if this condition is true,
> instead I want to have a message box appear telling the user what is
> wrong. How should I code this?
Check the data before filling. For example, you could loop through certain
columns with a datareader to check the data.
Or fill the dataset, then skip certain columns.
Removing a couple of columns usually does not speed up your
dataadpater.fill too much. If you notice that that DA.fill is slow, you
maybe putting too much data into a dataset.
|