.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

Multiple-step OLE DB operation generated errors in Pre-Execute

Posted By:      Posted Date: September 16, 2010    Points: 0   Category :Sql Server
Hello, I am getting below error; what could be the reason? The input is valid adn works good if I give to a multicast for test. But I get below error when I use OLEDB Destination ("table or view fast load") as my target. Note: Columns mappings are done auto by SSIS and All looks good as my source and destination are having same names as well. [Stage - Issue [33923]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E21. An OLE DB record is available.  Source: "Microsoft SQL Native Client"  Hresult: 0x80040E21  Description: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.". [Stage - Issue [33923]] Error: Cannot create an OLE DB accessor. Verify that the column metadata is valid. [DTS.Pipeline] Error: component "Stage - Issue" (33923) failed the pre-execute phase and returned error code 0xC0202025. Thanks, Prabhat

View Complete Post

More Related Resource Links

"Collection was modified; enumeration operation may not execute" errors while crawling BCS .NET conn



I've been examining a problem where sharepoint 2010 search creates the following kind of errors when crawling external system created using .NET connector:
"Error while crawling LOB contents. ( Collection was modified; enumeration operation may not execute. )"

The error seems to occur randomly for about 0.5% of all the crawled items. Sharepoint log shows the following line:
10/22/2010 17:31:49.30     mssdmn.exe (0x36AC)                         0x0460    SharePoint Server Search          FilterDaemon                      e4ye    High        FLTRDMN: Errorinfo is "Collection was modified; enumeration operation may not execute."  [fltrsink.cxx:553]  d:\office\source\search\native\mssdmn\fltrsink.cxx     

If a visual studio debugger is attached to the mssdmn.exe when the exception is thrown, the call stack looks like this:
+        $exception    {"Collection wa

Word Automation - Multiple DCOM Errors/Behavior

Before I get started, I already know that Microsoft does not support and highly discourages server-based MS Office automation.  I've read a multitude of posts and smarmy "*wink*, here's a link" replies, so I'm looking for actual help here, not condescending reprimands.

That notwithstanding, here is my problem.  I have developed a simple method that will open a local Word document, modify some header information, and then save the document as a new file.  As expected, it works great as a console/windows app, but as soon as I went to ASP.NET, DCOM jacked my world up when accessing the app remotely from a different domain account (that has access to the ASP.NET app.  For reference, my method is shown below:


1    public static string ModifyAndSaveBuildDocument(string localFilePath, BuildDocumentType docType, string buildNumber, DateTime buildDate, string projectName)
2            {
3                try
4                {
5                    ProjectConfiguration config = (ProjectConfiguration)ConfigurationManager.GetSection("ProjectConfiguration");

Errors when interacting with WorkFlow generated tasks through ISA Server


I have a MOSs environment that I have published through ISA Server 2006 and i am getting really strange behavior whentrying to interact with WorkLFow generated tasks when I have connected through ISA. This also seems to affect InfoPath Forms Services. I was wondering if anyone out there is seeing any problems when using ISA Server to interact wih Forms or WorkFlows?


The error I get simply states:

the form cannot be submitted to the web server either because your computer is offline or because the host server is currently unavailable.


Any help would be appreciated.





Collection was modified; enumeration operation might not execute.

Hi,            i'm trying to update my dataset. I want to finad a particaular value from dataset, and bind it to exch and every record of Dataset The code i'm using to update the dataset is: Dap.SelectCommand = Cmd Dap.Fill(DS)Dim pRow As DataRow For Each pRow In DS.Tables(0).RowsField1 = pRow("StoreName").ToString() Field2 = Convert.ToDouble(pRow("abc")) + Convert.ToDouble(pRow("sds")) + Convert.ToDouble(pRow("sdczs")) - ((Convert.ToDouble(pRow("xcvx"))) + (Convert.ToDouble(pRow("xcv"))) + (Convert.ToDouble(pRow("xvc"))))Dim row As DataRow = DS.Tables(0).NewRow() row("Field2") = MarginDS.Tables(0).Rows.Add(row) DS.AcceptChanges() Dap.Update(DS) ' ================================== ' ===> Bind Values To Web Chart <=== ' ================================== WebChartControl1.Visible = True WebChartControl1.DataSource = DS WebChartControl1.SeriesDataMember = "Field1" WebChartControl1.Series(0).ArgumentDataMember = "Field1" WebChartControl1.Series(0).ValueDataMembers.Item(0) = "Field2" WebChartControl1.DataBind() Next When i tried to execute the code i got the error saying  'Collection was modified; enumeration operation might not execute.' Can you pl .help in fixing the pr

SSIS Package returns the error - The command execution generated errors.

SSIS Package returns the error - 'The command execution generated errors'. Please let us know the cause for this error if anyone encountered this error before. Require a solution for this.   Thanks

SSIS Generic Error: The command execution has generated errors, more information?

How do I get more information from this error? I am just pulling from a csv file, looking up a couple values, and on match, updating a database with a stored procedure. I have made sure all datatypes match, and that there are no special characters in any of the records. I am importing over 3000 records, and only 4 fail, with this generic error, and I have scrutinized the data to the utmost. How do I get more information on this error? The lineageID is 0, what does that mean? In know it refers to a column, but 0 certainly doesnt relate to any columns. Thanks

Modifying a list results in "Collection was modified; enumeration operation may not execute"



I am trying to add a list column as well as assign a value to the list column which is newly created in the document libraries available in the site. After the value is assigned, when the second document library is about to iterate, I am getting an error as "Collection was modified; enumeration operation may not execute".

Below is the code i have used:


SPListCollection mylists = currentweb.GetListsOfType(SPBaseType.DocumentLibrary);
 foreach (SPList list in mylists)
 if (!list.Hidden)
AddField("CustomColumn", SPFieldType.Text, list.Fields);
 fieldCol.View.DefaultView = true;
int mouas = 5;
SPFolder folder;
folder.Item["CustomColumn"] = mouas;


How to rectify this?

Thank you

Send multiple parameters SSIS execute process task



We are using Execute Process Task in SSIS package to execute a batch file to house keep the generated flat files which are older than a week from the archive folder.

The same batch file is used to delete the some temp files generated in the process.

As the Archive folder and temp folder paths are configurable, we are trying to pass the folder paths as parameters to batch file.

I used Expressions tab of Execute process Task Editor to map the variable to Arguments property. This is working fine. but I need to pass one more variable as an Argument.

Can some one help me how to achieve this. Thanks in advance.


Sreekanth ABS



sql agent job command step multiple lines?


This is an oldie but a goodie, maybe there's a trick I haven't heard about?

When I create an OperatingSystem (CmdExec) job step, it seems to only execute the first line command. 

So if the first line is:

dtexec foo

It executes dtexec.  Fine.

But if I have two command lines:

set myvar=123
dtexec foo

It only executes the set command and never calls dtexec.  Bummer.

Now, we can work around this by executing a .cmd file, but then I have a whole issue of deploying .cmd files in different environments yada yada.

So the question is, is there any (new-ish) magic trick that will tell the SQL Agent job step to execute two or more command lines right from the job?




Collection was modified; enumeration operation may not execute.



I have the following foreach loop:



foreach (string variable in _variables.Keys)double fx = ObtieneValorParametro(variable, poliza, periodo);if (_variables[variable] == null)




_variables[variable] = fx;


Where _variables is of Dictionary<string, object> type.

The only modification to the collection I'm making is to change the value of an element from null to a value, as you see. I'm not removing nor adding elements, so, why I receive that error? I tried by using a traditional for loop, but since the collection is a Dictionary<string, object> collection I couldn't access the elements by mean of their indices.

Collection was modified; enumeration operation may not execute.


foreach(RepeaterItem rptitem in  rptroot.Items)
                if (rptitem.ItemIndex == 0)
                    RepeaterItem headerItem = new RepeaterItem(rptitem.ItemIndex, ListItemType.Header);
                RepeaterItem repeaterItem = new RepeaterItem(rptitem.ItemIndex, ListItemType.Item);
                Label lbl = new Label();
                CheckBox Chkroot = new CheckBox();
                lbl.Text = string.Format(" <b> {0} <br />",
                parentID = Convert.ToInt32(rptRootValues.Tables[0].Rows[rptitem.ItemIndex]["IdApplication"].ToString());
                repeaterItem = new RepeaterItem(rptitem.ItemIndex, ListItemType.Separator);
                LiteralControl ltrlHR = new LiteralControl();
                ltrlHR.Text = "<br/>";
                ListItem li = new ListItem();
                rptroot.ItemDataBound += new RepeaterItemEventHandler(rptroot_ItemDataBound);
                rptroot.DataSource = rptRootValues;

How can I add the same column to multiple list views in one operation?


Or do I have to go through my list of 20 views and do the changes to each one at a time?


Error: OLE DB provider "SQLNCLI" for linked server "MHTIS01T" returned message "Multiple-step OLE DB


Hi All, i am getting the error (in title) while executing the package.

can somebody tell me how do i solve it?

how to execute ALTER table for multiple columns


I have an SQL table called tbl, im trying to add the columns A, B and C to it.

When i execute the command :

 addcolumns = "ALTER TABLE SqlCreatedTbl ADD A char(50) ;";


 cmd = new SqlCommand(addcolumns, conn);

conn.Open(); cmd.ExecuteNonQuery();

The column is added perfectly and i can see it in the table !

However, when i try to add multiple columns, it does NOT work, it gives me an error..

the command im writting for adding multiple columns is the following:

addcolumns = "ALTER TABLE SqlCreatedTbl ADD ( A char(50), B char(50), C char(50) );";

the debugger highlights the line : cmd.ExecuteNonQuery(); and throws the following exception: Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax near '('.


Sharepoint Designer 2010 - Generated fields names causing errors


I'm creating a number of edit forms for external lists in Sharepoint Designer.  We're using Foundation so these are just the standard forms, not Infopath forms.

Basically I've cretaed the external lists and forms and have been deploying these using a Visual Studio solution.  In the forms I have replaced all the generated sharepoint form controls with asp text boxes or Drop Down Lists and have given these meaningful IDs so it's easier when hooking them up to asp validators.  This worked for the first deploy but now when i edit the form (for example to change a text box to a Drop Down List) I get errors which seem to relate to the field names generated by Sharepoint Designer.  It has generated databind statements which try to bind fields ids already in use elsewhere on the form.

The error message is

Error while executing web part: System.Xml.Xsl.XslTransformException: An error occurred during a call to extension function 'DataBind'. See InnerException for a complete description of the error. ---> System.ArgumentException: Item has already been added. Key in dictionary: 'ff15_1' Key being added: 'ff15_1'

Can anyone explain why it's generating these duplicate references?

My auto-generated code gives errors, can somebody see why???


I have a windowsservice and this windowsservice calls a webservice.
When I update this webservice, visual studio create a reference.cs.
The problem with this reference.cs is that is gives me more then 100 error
The error messages are all the same:
The type name 'AckService' does not exist in the type 'MyNewService.MyNewService' C:\MyNewService\Service References\AckService\Reference.cs 

Can somebody see why?

This is the code:

// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:2.0.50727.3053
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>

namespace MyNewService.AckService {
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "")]
    [System.ServiceModel.ServiceContractAttribute(Namespace="http://npq/AddIncident", ConfigurationName="AckService.ServiceSoap")]
    public interface ServiceSoap {
        // CODEGEN: Generating message contract since element name xmlString from namespace http://npq/Ad

Can I write multiple queries in Execute SQL Task Editor at a time


Can I write multiple queries in Execute SQL Task Editor at a time???


Can I write these two queries???

ALTER Table [Islamabad_campus]. [dbo]. [BS_Students] ADD Location   VARCHAR ( 10);

UPDATE [Islamabad_campus]. [dbo]. [BS_Students]

SET Location = 'Islamabad' ;

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