Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Define UDT at runtime?
Message
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00411345
Message ID:
00411849
Vues:
16
>>>Has anyone figured out a way to define the structure of a UDT at runtime?
>>
>>UDT are compiled so they can't be created at run-time.
>>
>>But, without knowing your needs, you may try another technique:
>>-a multi-dimensional dynamic array.
>>-a collection.
>>-XML.
>>-and surely others!
>
>Thanks for your response Éric. I have a procedure that accesses the same dozen or so records in a table a few 100,000 times. I wanted to speed the process by copying the structure and contents to an array like structure so I could avoid executing the .MoveFirst, .MoveNext, etc. commands upto one million times. The problem is that it is not possible to know the structure of the table at design time, so if I used an array I would need a second array to hold the structure and have one array looking up the corresonding value in the other.

If you only have about 12 records, disconnect your recordset once open. It will stay in memory client-sided. It will be fast. No need to recreate it elsewhere.

To disconnect a recordset, you simply set the ActiveConnection property of the Recordset to Nothing after opening your recordset.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform