Types in ASP, is it possible?

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

    Types in ASP, is it possible?


    Hey everyone,

    I am writing a basic tournament submit site for a poker tournamen
    group I am in. The situation is we want to use code to calculate wha
    we owe other members at the end of the week. The way I figured to d
    this is read from the database and store tournament numbers in an arra
    then run a query for each tournament and cycle through the tournamen
    data assigning the information where needed. I can not find if you ca
    or how you can use a Typedef in ASP. Pretty much I want to create
    type then make an array of that type. ie:

    Type typTournamentIn formation
    dim Number
    dim Member
    dim XYZ
    dim ETC
    End Type

    dim TInfo() as typTournamentIn formation

    then I can assign what I read from the database to tinfo(x).XXX

    Is this possible in ASP


    -
    Kewl
    -----------------------------------------------------------------------
    Posted via http://www.codecomments.co
    -----------------------------------------------------------------------

  • Aaron [SQL Server MVP]

    #2
    Re: Types in ASP, is it possible?

    Maybe with a class, but types aren't supported in VBScript. You could use a
    dictionary object, multi-dimension array, or - egads - a database?

    --
    Please contact this domain's administrator as their DNS Made Easy services have expired.

    (Reverse address to reply.)






    "Kewlb" <Kewlb.19i8ho@m ail.codecomment s.com> wrote in message
    news:Kewlb.19i8 ho@mail.codecom ments.com...[color=blue]
    >
    > Hey everyone,
    >
    > I am writing a basic tournament submit site for a poker tournament
    > group I am in. The situation is we want to use code to calculate what
    > we owe other members at the end of the week. The way I figured to do
    > this is read from the database and store tournament numbers in an array
    > then run a query for each tournament and cycle through the tournament
    > data assigning the information where needed. I can not find if you can
    > or how you can use a Typedef in ASP. Pretty much I want to create a
    > type then make an array of that type. ie:
    >
    > Type typTournamentIn formation
    > dim Number
    > dim Member
    > dim XYZ
    > dim ETC
    > End Type
    >
    > dim TInfo() as typTournamentIn formation
    >
    > then I can assign what I read from the database to tinfo(x).XXX
    >
    > Is this possible in ASP?
    >
    >
    >
    > --
    > Kewlb
    > ------------------------------------------------------------------------
    > Posted via http://www.codecomments.com
    > ------------------------------------------------------------------------
    >[/color]


    Comment

    • Jeff Cochran

      #3
      Re: Types in ASP, is it possible?

      On Fri, 16 Jul 2004 15:16:49 -0500, Kewlb
      <Kewlb.19i8ho@m ail.codecomment s.com> wrote:
      [color=blue]
      >I am writing a basic tournament submit site for a poker tournament
      >group I am in. The situation is we want to use code to calculate what
      >we owe other members at the end of the week. The way I figured to do
      >this is read from the database and store tournament numbers in an array
      >then run a query for each tournament and cycle through the tournament
      >data assigning the information where needed. I can not find if you can
      >or how you can use a Typedef in ASP. Pretty much I want to create a
      >type then make an array of that type. ie:
      >
      >Type typTournamentIn formation
      >dim Number
      >dim Member
      >dim XYZ
      >dim ETC
      >End Type
      >
      >dim TInfo() as typTournamentIn formation
      >
      >then I can assign what I read from the database to tinfo(x).XXX
      >
      >Is this possible in ASP?[/color]

      Not really, VBScript doesn't support types. Why don't you just read
      from the database and update it instead of creating an array to do
      everything in?

      Jeff

      Comment

      • The Mighty Chaffinch

        #4
        Re: Types in ASP, is it possible?

        > Type typTournamentIn formation[color=blue]
        > dim Number
        > dim Member
        > dim XYZ
        > dim ETC
        > End Type[/color]

        This looks like a record definition to me...
        [color=blue]
        > dim TInfo() as typTournamentIn formation
        >
        > then I can assign what I read from the database to tinfo(x).XXX[/color]

        An array of records, that's a table then...

        You can in server-side JScript create an object that is populated from a
        table row, encapsulating all the table access. I guess you can do the same
        in VBScript.

        But if you really want to store and retrieve the data as objects then I
        guess you need an OO database product.

        HTH

        MC


        Comment

        Working...