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 June 15th, 2004, 04:34 AM
Authorized User
 
Join Date: Jun 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

@Om Prakash
Quote:
quote:
how do i get asp variables (w/c are defined using Dim) dynamically without hardcoding it, i need it together w/ the server variables for error tracking if the page fails.

If i am correct, then are u talking about arrays? For the second part, do u want to navigate through forms collection?


Om Prakash
nope not arrays, and not forms collections, just variables defined in Dim only

-----------------------
@qazi_nomi
Quote:
quote:
Still confusing explain that why u want to use them and with declaring variable one can how do this ?

Love 4 all
i want to use them coz i wanna see why the error occurs in the page, btw, the error is irregular, it means that it doesnt happens all the time

----------------------
@rodmcleay
Quote:
quote:
I think what Marco is asking is to store all the variable information be it a variable in the page, session variable or request.
So if the page fails he still has all the information?

Is this correct Marco.

If so, I don't think there is a way to loop through variables you create on the page.

You can only do your best to ensure that nothing on the page will cause an error to make the page fail. And failures other than that caused in code would prevent the saving of any variable at all at any rate.
yep, i only need the variables defined in Dim so that i can monitor it. the error is intermittent and i cannot replicate the error


@all
thanks guys! :)

 
Old June 15th, 2004, 07:50 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 217
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to mega
Default

You should look into the tree error object you got: the VBScript error object, the ADO error object and the ASP error object. Define them in your global.asa or in a include file on critical pages.
If you don't know these objects I'll suggest that you search google, there is tons of stuff on the subject out there.

 - mega
 
Old December 7th, 2006, 02:25 PM
Registered User
 
Join Date: Dec 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to tavo
Default

Im trying to point to an array in a dynamic way, so i have only one function to do a task for multiple arrays.

the code is next.

def_tab_p1(0,0) = "label"
def_tab_p1(1,0) = "type"
def_tab_p1(2,0) = "value"

def_tab_f2(0,0) = "label"
def_tab_f2(1,0) = "type"
def_tab_f2(2,0) = "value"

function do_something(P_Tab)
   zTmp_tabla = Eval Execute("def_" & P_Tab)
   zTmp_long=UBound(zTmp_tabla,2)
   ...
   ...
end function


do_something "p1"
do_something "f2"

and i cant make it work.
am i thinking in wrong way the solution?

thanks

 
Old December 11th, 2006, 05:39 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 217
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to mega
Default

Your function should be
Code:
function do_something(P_Tab)
   Eval Execute(zTmp_tabla & P_Tab) ' I know the code looks weird
                                    ' but you're coding to whatever comes after the interpreter
   zTmp_long=UBound(zTmp_tabla & P_Tab,2)
   ...
   ...
end function
Haven't tested it though but it should work.. Nice idea

 - mega
Moving to C# .NET





Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling ASP.Net pages dynamically hericles ASP.NET 1.0 and 1.1 Professional 0 October 23rd, 2007 11:47 PM
Dynamically accessing ASP variables jordan147 Classic ASP Basics 1 May 21st, 2007 02:09 AM
Inserting variables into aspx pages dynamically. Grumpy ASP.NET 1.0 and 1.1 Basics 3 December 20th, 2005 08:32 AM
session variables in asp to asp.net marvz ASP.NET 2.0 Basics 0 August 1st, 2005 03:09 AM
list asp varialbes dynamically marco_1 Classic ASP Professional 2 June 14th, 2004 01:25 PM





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