Com objects and collections

Results 1 to 2 of 2

Thread: Com objects and collections

  1. #1
    Join Date
    Dec 1969

    Default Com objects and collections

    I am creating some vb components that have methods that return a collection of objects. In this case each object represents a car and the collection is a collection of all the cars in the database. Is it possible to manipulate the collection from asp IE<BR><BR>dim objCar<BR>dim col<BR><BR>set col = objCar.LoadAllCars<BR><BR>for each objcar in col<BR> &#039; do something<BR><BR>next objcar<BR><BR>I tried this but got a type mismatch error. Is it possible to use collections or should I attack this from a different angle. Any help greatly appreciated

  2. #2
    Join Date
    Dec 1969

    Default RE: Com objects and collections

    hi,<BR>actually, i feel u have a probelm in declaring the variables. By default the variable types are variant. So try declaring the variables as object. Please always declare the variables explicitly.<BR><BR>Ganesh

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts