User Defined Type structure in ASP?

Results 1 to 3 of 3

Thread: User Defined Type structure in ASP?

  1. #1
    Brian Cross Guest

    Default User Defined Type structure in ASP?

    The question:<BR><BR>Are User Defined Types possible in ASP? Similar to:<BR><BR>Public Type myCar<BR> Make as String<BR> Model as String<BR> Year as Integer<BR> Color as String<BR>End Type<BR><BR>I know I cannot specify the data type of each element, but is there a way to do this so I can use the dot separator (ie myCar.Color)<BR><BR>The reason:<BR><BR>I&#039m trying to create an ASP app that uses a DLL component. The methods available from the DLL require input parameters. The DLL was written in VB to require input parameters that are user defined types.<BR><BR>Any help is appreciated!<BR><BR>-Brian<BR>

  2. #2
    Rob Guest

    Default RE: User Defined Type structure in ASP?

    Build an array.<BR><BR>Regards,<BR>Rob

  3. #3
    Join Date
    Dec 1969

    Default Yes, but not how you want...

    With VBScript version 5, MS introduced the "Class" keyword to the language. With a VBS Class, you *can* build a user-defined type.<BR><BR>But you *still* can&#039t use the AS keyword in VBS. And *every* variable in VBS (even an instance of a Class!) is actually a VARIANT.<BR><BR>So if you have a VB DLL that requires a user-defined type, you are almost surely out of luck, as even though you can reference<BR> &nbsp; myObject.myMember<BR>with a VBS class instance, the "myMember" *will* be a VARIANT and will surely not be accessible from VB.<BR><BR>(Actually, it goes deeper than that: In an instance of a VBS class, the implementation actually consists of a collection of members. The collection stores POINTERS to the members. This doesn&#039t compare, at all, to the notion of a class in Visual Basic.)<BR><BR>Time, I think, to redesign that VB DLL.<BR><BR><BR><BR>

Posting Permissions

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