variant array from recordset

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • louis

    #1

    variant array from recordset

    I often read a recordset (ADO) into a variant array so that the array can
    contain text, currency, boolean, etc. VB.Net does not allow variants and the
    object type gives errors during conversion from VB6. To complicate matters,
    I also like to make the array 2 dimensions so I can put multiple records into
    the array. This is a great way to pass recordset info in/out of a
    subroutine, but now it does not work.
    Any help most apreciated.
  • gg

    #2
    Re: variant array from recordset

    how about array of structure. I have not used it but I am sure you look at
    easily from vstudio help or msdn or Google.

    a structure can have a combination of various data types as well as arrays
    too.


    "louis" <louis@discussi ons.microsoft.c om> wrote in message
    news:9366E9F2-8EC4-49F9-96BC-334B3C5138EA@mi crosoft.com...[color=blue]
    >I often read a recordset (ADO) into a variant array so that the array can
    > contain text, currency, boolean, etc. VB.Net does not allow variants and
    > the
    > object type gives errors during conversion from VB6. To complicate
    > matters,
    > I also like to make the array 2 dimensions so I can put multiple records
    > into
    > the array. This is a great way to pass recordset info in/out of a
    > subroutine, but now it does not work.
    > Any help most apreciated.[/color]


    Comment

    • louis

      #3
      Re: variant array from recordset

      Looked at the structure - could not find an example of using this with arrays?
      Would you just dim "CustName() as string" inside the structure? There is no
      way to know how many dimensions would be needed at design time.

      "gg" wrote:
      [color=blue]
      > how about array of structure. I have not used it but I am sure you look at
      > easily from vstudio help or msdn or Google.
      >
      > a structure can have a combination of various data types as well as arrays
      > too.
      >
      >
      > "louis" <louis@discussi ons.microsoft.c om> wrote in message
      > news:9366E9F2-8EC4-49F9-96BC-334B3C5138EA@mi crosoft.com...[color=green]
      > >I often read a recordset (ADO) into a variant array so that the array can
      > > contain text, currency, boolean, etc. VB.Net does not allow variants and
      > > the
      > > object type gives errors during conversion from VB6. To complicate
      > > matters,
      > > I also like to make the array 2 dimensions so I can put multiple records
      > > into
      > > the array. This is a great way to pass recordset info in/out of a
      > > subroutine, but now it does not work.
      > > Any help most apreciated.[/color]
      >
      >
      >[/color]

      Comment

      Working...