473,385 Members | 1,772 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Collection was modified; enumeration operation might not execute.

For Each row As DataRow In edt.Rows
dr = dt.NewRow
dr("slno") = i
dr("item_cd") = Convert.ToString(row("item_cd"))
dt1 = sp.FillDataTable("select ITEM_CD,SIBPART_CD from m033sibpart where comp_cd='" & Session("CompCd") & "' and ITEM_CD='" & row("item_cd") & "'")
dr("SIBPART_CD") = dt1.Rows(0)("SIBPART_CD")
dr("qty") = Convert.ToString(row("qty"))
dr("REMARKS") = Convert.ToString(row("REMARKS"))
dt.Rows.Add(dr)
i += 1
Next
May 11 '11 #1
1 2221
Me getting the error when i run the code in second time
May 11 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Dave Arkley | last post by:
I have a type Dictionary<int, List<int>> oKP = new Dictionary<int, List<int>>(); Im populating the dictionary so that a key is associated with a list of integers. I then remove some, or...
3
by: Anders Both | last post by:
My client-server system, is begining (when more client are connected) sometimes to throw an exception like this: Collection was modified; enumeration operation may not execute. foreach...
2
by: Tamir Khason | last post by:
I have a queue, wich recieves a lot of messages (between 10 and 100 a second) There is thread that takes care on this queue, but as far as I see it can not follow the messages so "Collection was...
2
by: Chuck Bowling | last post by:
I have a collection that I want to edit. When I remove an object from the collection and then try to enumerate thru it with the foreach statement it throws an exception - "Collection was modified;...
5
by: David C | last post by:
This is very strange. Say I have code like this. I am simply looping through a collection object in a foreach loop. Course course = new Course(); foreach(Student s in course.Students) {...
1
by: Tim | last post by:
Hi, I'm very new to .NET and am programming in C#. I have a web application where i have two list boxes. Its kind of like a shopping card where you can add items from one 'locations' list box to...
0
by: Geoffrey | last post by:
Hello, I work with .net remoting,to simplify, when the client connected, he send an handle to an object, the object is used to exchange message and events. no problem. In my server, I keep a...
4
by: nondos | last post by:
Hello I have a thread that run loop in queue variable like this: For each <somethingas <somethingin <queue variable>
1
by: Michel Racicot | last post by:
When executing the following function, I get this error message: Collection was modified; enumeration operation may not execute. The only thing that can modify lstClients is when I add one in...
1
by: SaradaV | last post by:
Hi all, I am working on vb.net web application and Often getting the following error. But even with the same inputs it is not reproducable. In most of the cases its executing successfully and in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.