Hello,
I am using a DataReader to read an ODBC Data Source.
Some of my dates are not valid. I would like to have the DataReader just treat the bad dates as Null. However I cannot seem to find a setting that will get me past the DataReader.
In SQL 2000 DTS I was able to use a script to skip the bad dates.
Please help because I don't want to have to run SQL 2000 DTS on SQL 2005.
Thanks,
Michael
You can send all rows that fail down the error output by setting ErrorRowDisposition=RD_RedirectRow for the output column in question. or, you can set ErrorRowDisposition=RD_IgnoreFailure and it will ignore those errors.
-Jamie
|||
Hi Michael,
If you right click the datareader src and choose Show Advanced Editor, then go to the Input and Output Properties tab, and expand the Output Columns collection, you can set the behaviour you want for error handling on a per-column basis. Click the column you want to ignore errors on, and change the "ErrorRowDisposition" property to "RD_IgnoreFailure". I think this will give you the result you are looking for -- NULL for columns that were invalid.
Let me know if this does not solve your issue.
Thanks
Mark