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 typTournamentInformation
dim Number
dim Member
dim XYZ
dim ETC
End Type

dim TInfo() as typTournamentInformation

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
-----------------------------------------------------------------------

Re: Types in ASP, is it possible? by Aaron

Aaron
Fri Jul 16 15:02:09 CDT 2004

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

--
http://www.aspfaq.com/
(Reverse address to reply.)






"Kewlb" <Kewlb.19i8ho@mail.codecomments.com> wrote in message
news:Kewlb.19i8ho@mail.codecomments.com...
>
> 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 typTournamentInformation
> dim Number
> dim Member
> dim XYZ
> dim ETC
> End Type
>
> dim TInfo() as typTournamentInformation
>
> 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
> ------------------------------------------------------------------------
>



Re: Types in ASP, is it possible? by jeff

jeff
Sat Jul 17 10:36:06 CDT 2004

On Fri, 16 Jul 2004 15:16:49 -0500, Kewlb
<Kewlb.19i8ho@mail.codecomments.com> wrote:

>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 typTournamentInformation
>dim Number
>dim Member
>dim XYZ
>dim ETC
>End Type
>
>dim TInfo() as typTournamentInformation
>
>then I can assign what I read from the database to tinfo(x).XXX
>
>Is this possible in ASP?

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

Re: Types in ASP, is it possible? by The

The
Sun Jul 18 11:57:13 CDT 2004

> Type typTournamentInformation
> dim Number
> dim Member
> dim XYZ
> dim ETC
> End Type

This looks like a record definition to me...

> dim TInfo() as typTournamentInformation
>
> then I can assign what I read from the database to tinfo(x).XXX

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