473,378 Members | 1,360 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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

Jul 19 '05 #1
3 1408
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" <Ke**********@mail.codecomments.com> wrote in message
news:Ke**********@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
------------------------------------------------------------------------

Jul 19 '05 #2
On Fri, 16 Jul 2004 15:16:49 -0500, Kewlb
<Ke**********@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
Jul 19 '05 #3
> 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
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Shailesh Humbad | last post by:
I wrote a short page as a quick reference to c++ integer data types. Any feedback welcome: http://www.somacon.com/blog/page11.php
6
by: Code4u | last post by:
I need to design data storage classes and operators for an image processing system that must support a range of basic data types of different lengths i.e. float, int, char, double. I have a...
20
by: GS | last post by:
The stdint.h header definition mentions five integer categories, 1) exact width, eg., int32_t 2) at least as wide as, eg., int_least32_t 3) as fast as possible but at least as wide as, eg.,...
9
by: Mikhail Teterin | last post by:
Hello! I'd like to have a variable of a pointer-to-function type. The two possible values are of type (*)(FILE *) and (*)(void *). For example: getter = straight ? fgetc : gzgetc; nextchar...
4
by: Dietmar Kuehl | last post by:
Hi, after reading the documentation on C# generics from several sources, I'm still unclear whether it is possible to infer associated types from a type argument. For example, if I have an...
5
by: Craig | last post by:
Hi everyone, As a relative new-comer to the wonderful world of .NET Framework and the C# langauge I have come across something that I would like to clarify (hopefully with the help of kind...
5
by: Stephen Lamb | last post by:
How would one do the following at runtime? I'm really interested in steps 2 and 3. 1. Read data from somewhere that describes types and instances. 2. Construct new types from data. 3....
58
by: jacob navia | last post by:
Hi people I have been working again in my tutorial, and I have finished the "types" chapter. If you feel like "jacob bashing" this is the occasion! I am asking for criticisms, or for things I may...
159
by: Bob Timpkinson | last post by:
Hi, I have a 32-bit machine... Is there anyway I can get gcc to use the following integer sizes? char: 8 bits short: 16 bits int: 32 bits long: 64 bits long long: 128 bits
55
by: tonytech08 | last post by:
How valuable is it that class objects behave like built-in types? I appears that the whole "constructor doesn't return a value because they are called by the compiler" thing is to enable...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.