Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Collection behavior when adding a new item
Message
From
24/07/2006 16:14:13
 
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01138855
Message ID:
01139435
Views:
15
>I referred back to you original post and I'm afraid I'm not sure what you are trying to achieve. Can you explain a little?

I have a collection. In this collection, I need to add a list of conditions. It can be from zero to x. Assuming I have 10 conditions to add, each of them have two parameters, I want to use only have variable for the add. I don't want to have to declare 10 variables because I would have to add 10 items in my collection. To me, I should be able to use the same variable all the time.

In VFP, I would do something like this, assuming I would use a cursor for the insertion:
LOCAL ARRAY laCondition[2]
laCondition[1]="My first condition title"
laCondition[2]="My first condition criteria"
INSERT INTO Something (Title,Criteria) VALUES (laCondition[1],laCondition[2])
laCondition[1]="My first condition title 2"
laCondition[2]="My first condition criteria 2"
INSERT INTO Something (Title,Criteria) VALUES (laCondition[1],laCondition[2])
But, in .NET, it seems that if I have an object, this confuses the collection.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform