Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Error Logging

Author  Topic 

Rupa
Posting Yak Master

123 Posts

Posted - 2007-06-18 : 10:03:54
Hey all

I'm using the Execute SQL Task to import error messages into a table. I'm using the following:

"INSERT INTO SSISLog (EventDescription)
VALUES (" +@[System::ErrorDescription]+")"

I've got an import task with deliberate errors in the file to be imported to test the error logging task. When I execute it, I get the following messages:

[Execute SQL Task] Error: Executing the query "INSERT INTO SSISLog (EventDescription) VALUES (An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Invalid character value for cast specification". )" failed with the following error: "The name 'An' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.


[Execute SQL Task] Error: Executing the query "INSERT INTO SSISLog (EventDescription) VALUES (There was an error with input column "IssueNo" (94) on input "Destination Input" (68). The column status returned was: "The value could not be converted because of a potential loss of data.". )" failed with the following error: "The name 'There' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

[Execute SQL Task] Error: Executing the query "INSERT INTO SSISLog (EventDescription) VALUES (The "input "Destination Input" (68)" failed because error code 0xC0209077 occurred, and the error row disposition on "input "Destination Input" (68)" specifies failure on error. An error occurred on the specified object of the specified component. )" failed with the following error: "The name 'The' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

[Execute SQL Task] Error: Executing the query "INSERT INTO SSISLog (EventDescription) VALUES (The ProcessInput method on component "Destination - tbl_clients" (55) failed with error code 0xC0209029. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. )" failed with the following error: "The name 'The' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

[Execute SQL Task] Error: Executing the query "INSERT INTO SSISLog (EventDescription) VALUES (Thread "WorkThread0" has exited with error code 0xC0209029. )" failed with the following error: "The name 'Thread' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

Any ideas?

Thank you in advance

Rupa

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-06-18 : 10:15:19
Why you are not enclosing textual data in pair of single quotes?

"INSERT INTO SSISLog (EventDescription)
VALUES ('" +@[System::ErrorDescription]+"')"



Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

Rupa
Posting Yak Master

123 Posts

Posted - 2007-06-18 : 10:27:38
Thx Harsh..That worked..but I'm now getting the following:

Error: No result rowset is associated with the execution of this query.

[Execute SQL Task] Error: An error occurred while assigning a value to variable "ErrorLogging": "Exception from HRESULT: 0xC0015005".

Task ErrorLogging failed

Sorry to bother you!!

Many thanks once again

Rupa
Go to Top of Page

Rupa
Posting Yak Master

123 Posts

Posted - 2007-06-18 : 10:32:25
It's done!! Thx Harsh!! I figured it out..had to set the ResultSet to: None

Many thanks for your help. You're a star!!!

Rupa
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-06-18 : 10:40:37
Glad to know that you managed to solve it on your own. It'll be a good learning experience for you.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page
   

- Advertisement -