?
Solved

Some kind of loop?

Posted on 2008-11-19
4
Medium Priority
?
155 Views
Last Modified: 2013-12-17
What I want to do - is to take X amount of values and for each, perform a loop and execute a SPROC in my data-layer - I am sure this is easy and have everything I need except how to grab each value and loop the execute...
0
Comment
Question by:tbaseflug
  • 2
4 Comments
 
LVL 5

Expert Comment

by:Ghoti_AZ
ID: 22998902
Sounds like a basic For loop to me.
0
 

Author Comment

by:tbaseflug
ID: 22998922
Can you give me an example?  Say I have three string values I am setting and I need to execute a code block for each?
0
 
LVL 13

Expert Comment

by:Onthrax
ID: 22999525
Depending on the type or data you want to loop through. If it's a collection then it should be something like:

for each Item in CollectionVariable
         'do stuff here..
next

Hope this helps...
0
 
LVL 13

Accepted Solution

by:
Onthrax earned 2000 total points
ID: 22999539
That was VB.

A C# example:

            foreach (string sForm in Request.Form.Keys)
            {
                'do code here
            }

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
Integration Management Part 2
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Suggested Courses
Course of the Month7 days, 19 hours left to enroll

616 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question