Using classic ASP, I have something like:
class cUser
Public function LoadData(p_id)
* load from database for the user p_ID *
end function
end class
Now my problem is this: I have a loop to get up to 50 User instances on a single page (fetching form posts lists).
I can get user instance by
dim User1
Set User1 = new cUser
But my question is: How do I see if the user instance has allready been created? Also what is the best way to make this 20 instances? By using User1, User2 etc... or defining instance as User2834 (2834 is users's ID in database)?
As the forum posts can be from same user, I really don't want to make multiple object instances of a cUser class if I allready have this user instance...
Maybe this is a newbee question, I am more used to work with functions than OOP.
Yours
Jerry