Groups | Blog | Home
all groups > vb.net data > february 2004 >

vb.net data : Searching for a way to replicate in .NET VB6 functionality



tim_frawley NO[at]SPAM fishgame.state.ak.us
2/17/2004 12:04:14 PM
In VB6 we could use a Set statement to create a 'handle' to an
existing DAO object. This was done to programmatically set the tables
needing to be updated using an array of dataobjects created in the
code.

' --- build array of all possible tables needing update
-------------
Set datDataControls(1) = dtaFW1
Set datDataControls(2) = dtaFW2
Set datDataControls(3) = dtaSW1
Set datDataControls(4) = dtaSW2
Set datDataControls(5) = dtaSW3
Set datDataControls(6) = dtaSW4
Set datDataControls(7) = dtaSW5
Set datDataControls(8) = dtaSW6

The datDataControls(index) could be used to issue updates via the
handle to the originating data access objects.

Is there a way to re-create this 'handle' functionality in .NET
Marcin Floryan
2/20/2004 10:24:49 PM
First of all you do not need the Set statement to create a handle
(reference) to a DAO object, in
VB .NET simple assingment creates a reference (not copy of the object).

To recreate your behaviour I suggest you simply create a collection or an
array of DataControls

[quoted text, click to view]

AddThis Social Bookmark Button