.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Error on INSERT INTO (using Parameter) within Execute SQL task

Posted By:      Posted Date: September 20, 2010    Points: 0   Category :Sql Server


I'm sure there is a simple solution to this, however to save my banging my head against a brick wall: -

Within the "Execute SQL Task Editor" I have the following; -

Parameter Mapping Tab; -

Variable Name; - System::PackageName,
Directtion; - Input,
Data Type; - NVARCHAR,
Parameter Name; - 0,
Parameter Size; - 100

General Tab; -

SQLStatement; - INSERT INTO dbo.CustomSSISLog  (System::PackageName)     VALUES (?)

When I click on the "Parse Query" button I get the following error; - "

The query failed to parse. Parameter Information cannot be derived from SQL statements. Set parameter information before preparing command.


The table exists as follows; -

USE [ErrorLog]
CREATE TABLE [dbo].[CustomSSISLog](
	[CustomSSISLogKey] [int] IDENTITY(1,1) NOT NULL,
	[PackageName] [nvarchar](100) NULL

Any help would be greatly appreciated.

Kind Regards,


If you have found any of my posts helpful then please vote them as helpful. Kieran Wood MCTS BI, PGD SoftDev (Open), MBCS http://uk.linkedin.com/in/bileeds

View Complete Post

More Related Resource Links

Execute Process task - On Error (i want to override the error message)

Hi, In my package I am calling one exe to copy the files from local folders to SFTP. I am using a execute process task and I am passing the parameters like (address, username, password,....). The exe and syntax are given below. SFTPCopier.exe <<machinename>> <<username>> <<password> <<local directory path>> The problem is when the exe is failing to copy the files to SFTP due to some reason, the SSIS package is outputting the entire command in the log information (including the username & password). I dont want to write the password in the log information. I want to remove that password from the log information when an error occured in the execute process task. Can some one please tell me the way to override the message? Can I put a on error handler for that execute process task and use a script task to modify the "ErrorDescription" variable? Will that works? Thanks in advance.  

Get error message from bulk insert task.

Hello, I've created a dtsx package that bulk inserts some data from a csv file into a sql table (using the BULK INSERT TASK). Because this package is scheduled to run automatically, I also added a EXECUTE SQL TASK that will insert a row in a 'log table'. It is linked to the BULK INSERT task with a 'Succes constraint (green arrow)', so I know about all the successes. But I am more interested in the failures, so I also added another EXECUTE SQL TASK and linked it to the BULK INSERT task with the 'failure constraint (red arrow)'. Question: How can I get the error message from the BULK INSERT TASK (like 'file does not exist' or 'error converting .....') and store it in a field in the 'log table'? Thanks in advance, Peter

Insert error description in sysjobhistory from ssis script task

hi. in ssis i have script task that, in some situations, raise error (Dts.TaskResult = ScriptResults.Failure). But in sysjobhistory table there is only shor description what happend (Description: The script returned a failure result.). Is there any way that i can set some system variable to describe what is error so that description ens up in sysjobhistory table? in the end, i want to look in job activity monitor and see that job is "red" and see the description that couses this failure.

SSIS Execute Process Task Give "Access is Denied" error but it is not related to access control.

Hello All - I have a very weired SSIS problem. I am using BIDS in two machines - Windows 7 Professional Edition x64 bit (development workstation) and Windows 2003 Standard Edition x32 bit SP2 (server) . The visual studio version on both the machines are Version 2.0.50727 SP2. I found that my package's ExecuteProcessTask fails with "Access is denied" error in Windows2003 but runs ok in Windows 7 dev box. I then tried to debug the package in the Windows 2003 environment itself. The package failed in debug mode too with the same message. After looking for a while I found that when I shorten the Argument length of the failing ExecuteProcessTask the task did seem to work. So in Windows2003 environment if my argument exceeds 1846 characters the ExecuteProcessTask fails with message "Access is Denied". If the argument string is less than 1846 it works ok. In Windows 7 environment there is no problem at all. It does not seem like access problem but I may be wrong. Has anyone seen this? I will appreciate any reply. Thanks, Niben  

Implementing Transaction in SSIS Package - [Execute SQL Task] Error: Failed to acquire connection "<

I have a simple SSIS package with three "Execute SQL Tasks". I am using ADO.Net Connection to execute SPs on a DB server. When I execute this package It works fine. So far so good. Now, I need to implement transation on this package. And problem starts now onwards. When I try to execute package after setting TransationOption = Required for the Sequence container which contains all the tasks, I get following error. [Execute SQL Task] Error: Failed to acquire connection "NYCDB0008.Export". Connection may not be configured correctly or you may not have the right permissions on this connection. "NYCDB0008.Export" is the name of the ADO.Net connection. I have been hunting for any solution but all in vain. I have tried changing all DTC settings on the dev as well as Database server. Please respond if anyone has any solution. Thanks! Anand

error code:0xC0024104 source: Reporting Task for subplan- Description: the execute method on the tas


I am getting following error when running maintenance plan under schedule job. I am getting this error for maintenance cleanup task.  The job is not failing all the time but alternate weeks. I created same maintenance plan on test server(same configuration as PROD) and Maintenance cleanup task related job failed for first time and running fine from there. I don't know why it is causing failed. I checked maintenance plan history and it show successful each time. even i checked manually it deleted all the report files related to maintenance plan. History Cleanup task and Maintenance Cleanup task should not be created on same Maintenance Plan?....I know SQL Server 2005 had some problem with maintenance plan creation before SP2.

SQL2008 INSERT INTO @table_variable EXECUTE(...) AT ORACLE_LINKED_SERVER error Msg 1206 "MS DTC has


Dear experts,

I'm trying to insert into a table variable from an EXECUTE(...) AT ORACLE_LINKED_SERVER statement but frequently I get one of the following errors:

Msg 1206, Level 18, State 124, Line xxx
The Microsoft Distributed Transaction Coordinator (MS DTC) has cancelled the distributed transaction.

Msg 8520, Level 16, State 1, Line xxx
Internal Microsoft Distributed Transaction Coordinator (MS DTC) transaction failed to commit: 0x8004d019(failed to retrieve text for this error. Reason: 15105).

Msg 3930, Level 16, State 1, Line xxx
The current transaction cannot be committed and cannot support operations that write to the log file. Roll back the transaction.

However, sometimes it works without error.

Apart from these errors, I don't completely understand why this is being treated as a distributed transaction because I'm inserting into a T-SQL table variable and I thought these were exempt from the usual transaction rules (apologies for my ignorance!).  I'd much prefer it if I could flag it as not being part of a transaction.

I've spent quite a bit of time with Google, MSDN, and OTN but can't spot anything which appears to match my particular problem so would appreciate any thoughts or help please.

Code running on MS SQL 2008 Enterprise Edition (64-bit) 10.0.2531.0 SP1 on W

Capturing the error for a query written in an Execute SQL task



I have a SSIS 2005 pkg with an execute SQL task and a query as a SQLstatement. I want to capture a possible error generated from this query. How can I do it? Using the Result set?


[Analysis Services Execute DDL Task] Error: File system error: A FileStore error from WriteFile occu


Hi ,

iam facing one issue while Running one Dimenstion,i got the data in my fact table,and try to processing into dimenstion,i searched somany sites and Blogs,please find the error details

[Analysis Services Execute DDL Task] Error: File system error: A FileStore error from WriteFile occurred. Physical file: \\?\M:\MSSQL\Data\DnB.0.db\Primary Contacts.0.dim\71.Fact Key.asstore. Logical file: . .


1) i verified space in my server Drives all are sufficent my drive (M:\) is around 459GB free space

2) i verified permissions of this folderCube ,it have proper permissions,actually i ran same cube thrice per a month,iam facing this type of problem this time only

3) i chnaged the settings like Process MeasureGroup like By attribute inplace of ByTable,but not work

4)i changed server configuration setting in msdsrv.ini file and change Bufferlimit  set 1 ,but no Luck

5)i chnaged Maximum connection allowed to reduce 1 or 2

6) i divided my dimenston into subparts based on columns and created New dimenstion but iam seeing same issue.

one more thing iam observing if i processed with By attribute i got the above error,if i processed Bytable i got the

File system error: A FileStore error from WriteFile occurred. Physical file:

Result set of a execute sql task as parameter of another execute sql task ?


Hi, Im having some problems over here. I want to use the result set (Full set stored as an Object) of an Execute Sql Task as input parameter of another Execute Sql Parameter. I want to do some insertions on the second task with the result table of the first one.

Is this even possible ? Or do I have to use a foreach loop or a script task ?


Thanks !

Insert Error not helpful



I am using VS2010

When I try to updated or insert a record in my User table I am getting an error that does not make sense to me and I cannot figure out what is wrong.

Also, when I try to insert a new record I get a validation error saying that the Id is required. However it is an identity field in the db so it should not be necessary to send it to the server.

Could you please shed some light?


An error has occurred.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Microsoft.Web.UI.WebControls.EntityOperationException: An error has occurred.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

Stack Trace:

[EntityOperationException: An error has occurred.]
   Microsoft.Web.UI.WebControls.DomainDataSourceView.PerformCudOperation(ChangeSetEntry operation, Action`1 operationPerformingEvent, Action`1 operationPerformedEvent) +331
   Microsoft.Web.UI.WebControls.DomainDataSourceView.UpdateObject(Object oldEntity, O

Convert .docx to web page - "the converter cannot complete the task because an internal error occurr


I'm trying to convert docx files to webpages to be published in to a library elsewhere on our sharepoint site. At first I was having no problem, the files were converting, however more recent files have returned the error: the converter cannot complete the task because an internal error occurred

I've tried writing, uploading and converting a simple docx file, and this works which has led me to believe that the problem is something in the docx files that i'm trying to convert. So i tried using word07 to clean the documents up by clicking Office button>prepare>inspect document then removing all the metadata, custom xml etc from the files resave, upload and convert, but still no joy.

I'd simply rewrite the document but the problem is that there are a lot of them.

Any ideas what's going wrong?


Error by insert new item in dataview sharepoint designer



doesn't any1 know the answer of my question?

i'm trying to create a data view with the edit, delete and insert function.

the edit and delete works fine. only the insert gives me this error:

The data source control failed to execute the insert command.

plz help?

can't to insert value to EXCEL folder get error

Hi Can't to insert value in EXCEL folder get error   The Microsoft Jet database engine could not find the object 'Sheet1$'.  Make sure the object exists and that you spell its name and the path name correctly.   there is a code      The Microsoft Jet database engine could not find the object 'Sheet1$'.  Make sure the object exists and that you spell its name and the path name correctly. {        string sConnectionString = null;     sConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source='C:\\Users\\12.xls';Extended Properties=\"Excel 8.0;\"";        System.Data.OleDb.OleDbConnection objConn = new System.Data.OleDb.OleDbConnection(sConnectionString);        objConn.Open();          //Add two records to the table.        System.Data.OleDb.OleDbCommand objCmd = new System.Data.OleDb.OleDbCommand();        objCmd.Connection = objConn;        objCmd.CommandText = "Insert into [Sheet1$] (FirstName, LastName)" + " values ('Bill', 'Brown')";        objCmd.ExecuteNonQuery();        objCmd.CommandText =

Execute Package Task password issue

I have a parent and child package. Both are stored on the file system and both are password protected. My problem is that when I call the child package from the parent using execute package task, I get prompted for the child package's password. Now the PackagePassword property of the Execute Package Task is supposed to take care of that. But for some reason the password stored in the Execute Package Task is not getting passed to the child package.  I've re-entered the PackPassword property several times, but it did not help.  I even tried loading the password from a config file, but that did not make any difference.  Can anyone help?

XML Task error message hexadecimal invalid character

I am developing a SSIS package to add data from an XML file to an existing SQL Server table.  I have completed several similar projects, but on this XML file I am getting the error from the Data Flow tab between the XML Task and Data Flow Task: Error: 0xC002F304 at XML Task, XML Task: An error occurred with the following error message: "'', hexadecimal value 0x15, is an invalid character. Line 28, position 54.". Error: 0xC002928F at XML Task, XML Task: Property "New Source" has no source Xml text; Xml Text is either invalid, null or empty string. Task failed: XML Task Warning: 0x80019002 at zSTU_TS_Element: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (2) 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 "zStu_TS_Element.dtsx" finished: Failure. Do you know how I can fix this? This is the line it is referring to: <z:row c0='12' c1='80' c2='2006-04-17' c3='539' c4='1M2083N4N5N6N75800901110 11 '/>

ssrs 2008 R2 - report parameter with no default set throws java script error

We have recently upgraded from SQL Server 2008 to SQL Server 2008 R2....I am experiencing a problem with my report parameters on my SSRS reports. It seems that my report parameters that I do not have a specified 'default' value throws a java script error when I try and run/render the report under R2.  As soon as I put a 'default' value on the report param, everything is fine.  However, that is not the behavior we need for our reports...the user needs to pick their selection. Can anyone shed some light on this, it seems to be an AJAX problem...I need to be able to have report parameters with a list of values, but no 'default' value on the parameter.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend