July 9, 2006 at 8:16 pm
Hi,
I am getting the following error when processing a Date Field:
---------------------------
Package Error
---------------------------
Error Source : Microsoft OLE DB Provider for SQL Server
Error Description : The number of failing rows exceeds the maximum specified.
Insert error, column 9 ('DOB', DBTYPE_DBTIMESTAMP), status 6: Data overflow.
Invalid character value for cast specification.
---------------------------
OK
---------------------------
The source data is MS-Access, the destination MS SQL.
The following transformation, does not seem to help:
Function Main()
if IsDate( DTSSource("DOB") ) then
DTSDestination("DOB") = DTSSource("DOB")
else
DTSDestination("DOB") = NULL
end if
Main = DTSTransformStat_OK
End Function
Any ideas on how to further check the date field to make it play nicely?
July 10, 2006 at 4:32 am
did u specify the destination date field should not contain null value?
July 10, 2006 at 6:30 pm
not sure what you mean.
I made the user fix the data, and warned them about being more careful with their data entry.
July 11, 2006 at 10:39 am
Use ON ERROR instead on date casts.
Function Main()
On Error Resume Next
DTSDestination("DOB") = DTSSource("DOB")
If err then
err.clear
DTSDestination("DOB") = NULL
end if
Main = DTSTransformStat_OK
End Function
It's messy, but the activex IsDate function works with different date range values that the SQL equivalent. Especially since a SQL date can be either smalldatetime or datetime.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply