Hello,
I try to import an ASCII file by using the next source:
------
INSERT INTO [ENTITIENAME]
([all-fields])
SELECT [all-fields]
FROM OpenDataSource('Microsoft.Jet.OLEDB.4.0',
'Data Source=[DIRECTORY-NAME]
;Extended properties=Text')...[FILENAME]
-----
It works fine, unless the input file has correct data.
When a field has a bad record (like a date format) it will
stop the import with the next error:
Server: Msg 8114, Level 16, State 8, Procedure [procedure name], Line 240
Error converting data type DBTYPE_DBTIMESTAMP to datetime.
I know why the error exitst, but i need to controle the flow.
How can I controle this error within a Stored-Procedure ?
Thanks!
I try to import an ASCII file by using the next source:
------
INSERT INTO [ENTITIENAME]
([all-fields])
SELECT [all-fields]
FROM OpenDataSource('Microsoft.Jet.OLEDB.4.0',
'Data Source=[DIRECTORY-NAME]
;Extended properties=Text')...[FILENAME]
-----
It works fine, unless the input file has correct data.
When a field has a bad record (like a date format) it will
stop the import with the next error:
Server: Msg 8114, Level 16, State 8, Procedure [procedure name], Line 240
Error converting data type DBTYPE_DBTIMESTAMP to datetime.
I know why the error exitst, but i need to controle the flow.
How can I controle this error within a Stored-Procedure ?
Thanks!