Error with SQL query: The query failed to parse. Exception from HResult: 0x80040E14

2

I am using SSIS to create a data flow task to a postgresql server database.

I get the Error with SQL query:

The query failed to parse. Exception from HResult: 0x80040E14

See below screenshot:

https://ibb.co/7KcBnMG

https://ibb.co/zR093SQ

The query being tried is:

INSERT INTO public.controlflow_example(rollnumber) VALUES (1)

The connection itself is fine. The schema is public, the table is indeed spelled controlflow_example, and the column is integer type named rollnumber

Even using

SELECT * 
FROM public.controlflow_example 

as an even simpler query gives the same error.

If i try to run the package it fails with the following error:

SSIS package "C:\Users\AJ\Documents\Visual Studio 2017\Projects\control_flow_example\control_flow_example\Package.dtsx" starting. Error: 0xC002F210 at Execute SQL Task, Execute SQL Task: Executing the query "INSERT INTO public.controlflow_example(rollnumber)..." failed with the following error: "Exception from HRESULT: 0x80040E14". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. Task failed: Execute SQL Task Warning: 0x80019002 at Package: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors. SSIS package "C:\Users\AJ\Documents\Visual Studio 2017\Projects\control_flow_example\control_flow_example\Package.dtsx" finished: Failure. The program '[15288] DtsDebugHost.exe: DTS' has exited with code 0 (0x0).

Any advice please?

I have already searched for similar questions here and elsewhere but could not find a resolution.

Thank you.

postgresql
visual-studio
ssis
control-flow
execute-sql-task
asked on Stack Overflow May 11, 2019 by mampoa • edited May 11, 2019 by Hadi

2 Answers

0

Maybe you should change the function name and use private it works properly.

INSERT INTO public.controlflow_example column name VALUES ('1');
answered on Stack Overflow May 11, 2019 by priyanshu kumar • edited May 11, 2019 by Hadi
0

Are you trying to store the result set into an SSIS object? The result error means you did not set up the result properly. If you are not expecting any results back, then set result set to be nothing. If you are, then check to make sure you’re returning the results correctly.

Check out how to return results https://www.google.com/amp/s/www.red-gate.com/simple-talk/sql/ssis/ssis-basics-using-the-execute-sql-task-to-generate-result-sets/amp/

Good Luck

answered on Stack Overflow May 11, 2019 by meepkitty

User contributions licensed under CC BY-SA 3.0