Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 9th, 2004, 11:13 PM
Registered User
 
Join Date: Aug 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to rmwalters2000 Send a message via Yahoo to rmwalters2000
Default Dim Types in ASP?

Dumb question but I am from old school of programming and I was wondering if there were types with in ASP?

IE

Dim Type Dog
   Breed as String
   Age as Int
 etc...
End Type

Reason? I am looking for a way to capture a multipage form with fields on each page and have them in one variable that can be passed around from page to page and address the variables along the lines of

dog.breed = "Lab"

Any thoughs would be great for this one.

Rick
 
Old August 9th, 2004, 11:34 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Rick,

In ASP all variables are of VARAIANT type. So you cannot have one like that you wanted.

Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old August 11th, 2004, 12:28 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Rick,

   As vijay said in ASP you cannot specify datatype in the variable declartion. By default all variables are of variant type.

In the coding you can use conversion functions to change the datatype.

For Ex: dim productname,price
productname=request("txtProdName")
price=csng(request("txtPrice"))

for date/time values, use CDATE() function.







Similar Threads
Thread Thread Starter Forum Replies Last Post
The origin of the "DIM" keyword RGCook BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 9 February 6th, 2009 09:03 AM
What does (Me!) and (Dim)stand for in VBA Coding? srswedeen Access VBA 1 October 14th, 2005 06:41 AM
Can't DIM database object egolsen Access VBA 2 September 26th, 2005 04:25 PM
Dim dbs As Database Brian263 Access 1 May 6th, 2004 07:11 PM
Dim in VB.NET khautinh VB.NET 2002/2003 Basics 2 August 3rd, 2003 09:54 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.