Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL against a collection ?
Message
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00483741
Message ID:
00483800
Vues:
7
>>>SQL against a collection ? Anyone know how?
>>
>>What do you mean exactly?
>>
>>I consider a database to persist data between application use and users.
>>
>>I consider a collection as a way of temporarily storing data for the use of an application.
>
>I do as well. I am just trying to identify alternate methods to remove some lookups I have from a table based solution to another alternative, I am looking for more speed. Currently, I do a lookup like "select * from coord.dat where coord.x >= 3725 And coord.x <= 4405 And coord.y >= 2090 And coord.y <= 2770" This will always return a single record in my data set. I realize that I could use a recordset and keep it available at all times in the app. I was just wondering if I could select an object from a collection in the same way.

You can retreive an item of a collection using a key. When adding a record to a collection, you can add a value to the key parameter and use it like:
colx.Item(key).SomeProperty = ...
There is another structure that could fit your needs: Disconnected/In-Memory recordsets.

I often use this structure as a replacement to an array since there is Find, Filter, Sort, Add, Update, Delete, Move, ... features.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform