Application Variables And Arrays

Has anyone worked with Application variables in an array format? I need to create a list of 40 items using some sort of persistant array. I can do this with a DB, but in this case, it would not be efficient.

I did a few tests by trying to pass an array to an Application var, but can't seem to get it back.

<% Dim MyArray(39)
'populate the array
Application("myArray") = myArray
%>

then on another page, I tried

<%
Dim myArray(39)
myArray = Application("myArray")
'loop through the retrieved elements
%>

This doesn't seem to work.. anyone did something similar with good results?

View Replies


ADVERTISEMENT

Application Level Arrays In ASP

In our application, we have noticed on two rare occasion where the
data stored in application level arrays has disappeared. We have 3
application level arrays, and many other data types stored at
application scope as well. The other data types appear to have been
unharmed.

All session level data remained unharmed as well. The data
in the arrays seemed to have disappeared all of the sudden. No IIS
restarts, for example, were performed. Is there any known issues with
arrays being stored at application level.

View Replies View Related

Session Variables And Arrays

I want to store a bunch of textstrings (about 500) returned from a database
query in a session array. I've googled all over the net, not to find any
working method.

Is there anybody who has the ultimative, definite working method as to how
you transfer a "local" array to a session array and later transfer the
session array to a "local" array.

View Replies View Related

Arrays And Session Variables

how can i go about creating arrays in ASP and then storing them in session variables?

View Replies View Related

Checkboxes, Arrays, & Session Variables

Basically each page has a checkbox for each item and they should be able to click the items they want to add and continue on, and at the end it creates a dynamic report to give to a customer. On the first page there are 9 check boxes. The access database table called "IMAP" has two columns: "id" (primary key) with values 1 thru 9 and a column "active" with the yes/no type. Code:

View Replies View Related

ASP Application Variables

I am using IIS 6.0 and am trying to use application variables to track uasge. They work fine as long as there is an active client but about 20 minutes after the last activity they are reset to the default values declared in the global.asa file.

View Replies View Related

Application Variables

If I'd use 1000+ application variables, would it decrease my server's performance?

View Replies View Related

Application Variables

I'm building a web app with a lot of ASP files which I'd like to split out into several different subfolders. However, I noticed that application variables that I set up in my Application_OnStart event sometimes survive switching to a different folder while at other times they do not. I am relatively new to ASP so I'm not sure if I'm doing something that inadvertently unassigns these variables.

One thing I kow I'm not doing is explicitly reassigning or unassigning them.My other option is to assign them in a default.asp or some other generic file that I replicate in all my folders and include in the entry point asp file to each folder,but I'd rather avoid the redundancy so as not to complicate maintenance further.

View Replies View Related

Application Variables

can I put together an object (not too big, just a small array or something) and chuck it in an Application variable or are there better ways to do this? Sessions are okay if it's a better alternative to Application but I'd rather skip cookies if I can.

View Replies View Related

Abt Application Variables

I would like to know what are the Advantages &
Disadvantages of using Application variables in an ASP page.
In my application I would like to store some physical
paths from database to application variables.

I'm in a dilemma whether to hold this values in
application variables or in server side variables in
an include file. Please help me with this..

View Replies View Related

Application Variables Changing

users login and can navigate an administration area, however, at random (it seems) when you click on a link to navigate to another spot in the admin portion the application variable used to denote the user as an admin is getting changed, and therefore load the homepage because it thinks you are not logged in. any suggestions? need more info?

View Replies View Related

Session And Application Variables

I've got two domain names sharing the same IP address that use ASP VBScript
If I set a session variable with domain 1, it is only available for domain 1 - this is
correct?
If I set an application variable with domain 1, the app variable is sharing across all
domains using that IP address - this is correct?
This is the behavior I am seeing and I want to make sure that my server is set up
correct. I especially want to make sure application variable behavior is correct.

View Replies View Related

Changing Application Variables

i would need to know if i can permanently modify the content of the global.asa file.

I am writing a web log in form that enables users to change their password (i dont need much security, this is more for practical purpose so i use application variables), these passwords are defined in the Application_OnStart() event but i would like to be able to change them without having to manually rewrite them.

View Replies View Related

Session An Application Variables

I want to store the link of the page that each user of my web site visited so it can help me to personalise information for each user depending on the pages visited.I don''t know what kind of variable should I use.

If I understand well, a Session variable is deleted when the session end so when a user close the browser and then reconnect to my web site, the session variables used the first time will be deleted and I can''t keep track of the pages visited.Same thing for the application variable except that the variables will be deleted when the application stops.

View Replies View Related

Destroying Application Variables?

I intend to use application variables to control access to editable blocks on an intranet site. There are about 300 blocks currently and that may grow to as many as 400 as time goes along.

Using the scheme I am thinking of an application variable will contain the username of the person currently editing a block. Is there a way to "destroy" the application variable so it no longer occupies memory or is this anything to be concerned about? I don't plan to place much more than a 20 character string into the variable.

View Replies View Related

Global.asa And Session/application Variables

I have absolutely no idea how global.asa works. I've read through quite a number of articles and they're all fine and dandy but implementing it on my (first) ASP application just doesn't work. It's amazing how ASP.NET automates everything for you.

Anyway, I need to store session variables and I have no idea how to. I have no global.asa file, but I can declare session variables fine. So does that mean that somewhere in the ASP process, a Session_OnStart() method's already running.

If I create a global.asa file, I put it in the same directory with other ASP files right?

A global.asa file should contain the basic four application/session methods... and shouldn't really contain much code, unless I want to start a variable with a default value. True or false (I say true). Code:

View Replies View Related

Application Variables Vs Include File

What are the best methods for using global constants and variables? I've noticed that many people put all global constants in a file and include that file on every page. This is the best way of doing it - is it not? Once the application has loaded the page it is cached and is immediately available for other pages.

With global variables - the best thing to do would be to use application variables - so long as there weren't too many declared. Is there another (easy) way of using global variables apart from using application variables?

View Replies View Related

Global.asa & Resetting/clearing/deleting Application Variables

I'm just dipping my toes into server-side scripting.

The Global.asa file seemed really nice, but am I understanding correctly that the application onstart event is fired ONLY when the server is started/re-started or when the FIRST user logs onto an ASP application?

If that's the case, then all the changes I keep making to my Global.asa file are pretty useless, right? (which seems to be the case -- i.e., my pages are not using any of the new information). Code:

View Replies View Related

Application Object :: Existence Of Variables, Resources And Locks

I'm using application variables for a web based sales tracking application. I use the variables for stuff like connection string, database name, etc. I store the values in a asp file that is included in a login page. The assignments are in a procedure that I then call on the login page. This is done everytime a user connects to
the login page.

what's happening to the variables? Are they being overwritten everytime a user accesses the page? I'm not checking for the existence of the variables. I just call the routine everytime the page is accessed. I know the values are shared for all users but, I was wondering if I should check for the existence of variables? Will it free up resources? Should I be using locks?

View Replies View Related

Access VB Application From Web Application

We have our web-site developed in classic ASP, and I need to add this additional feature on one of the pages to access a VB application. How can I do that? The VB application basically sends output to the COM3 port and opens a USB-Cash drawer that is attached to it. I am not sure how to go about with this.

View Replies View Related

Arrays

I have trouble working with arrays in asp.. I have the following error :Microsoft VBScript runtime (0x800A0009)
Subscript out of range: '[number: 0]'

the line that gives me the error is the following:
Door_OpeningValH= aDoor_OpeningVal(0)
and my code is this:

Door_OpeningVal= rs("Door_Open_Dimension")
aDoor_OpeningVal = split(Door_OpeningVal, "x", -1, 1)
Door_OpeningValH = aDoor_OpeningVal(0)
aDoor_OpeningValW = split(aDoor_OpeningVal(1)," ",-1,1)
Door_OpeningValW = aDoor_OpeningValW(0)
Door_OpeningValUnit = aDoor_OpeningValW(1)

what i'm doing is recivieng values from 2 textboxes and a combo box.I want it to save in my database like this:
2x5 ft

View Replies View Related

Arrays

I need to create a multidimensional array using another int as one of the criteria but I keep getting probs with my code, what am I doing wrong?
Code:


intMonthName = Cint(Month(field_in_my_database))
Dim myarray(intMonthName,2,5)
I get this error message:

Quote: Microsoft VBScript compilation error '800a0402'

Expected integer constant

View Replies View Related

2D Arrays

I am using ASP with VBScript and I want to know how to seperate a 2 dimensional array into 1 Dimensional arrays:

like if

MyArray is a 2 D array and I want to store the first row of this array in another array , like in C

MyArray[5][5] //this is a 2D array

OneDimArray=MyArray[0] // stores the first row of the 2D array in OneDimArray

is there a way to do it in VBScript ????

I couldn't find a way

I don't want to do it with loops I hate code with too much loops,

View Replies View Related

Arrays

How can display unique values from an array. I dont want to loop thru all the values and do it. Is there a better way?.

View Replies View Related

Arrays

What does the numeral '1' mean in the following statement?

For J = 0 to UBound(QArray, 1)

View Replies View Related

Arrays

I have an array in ASP and I am populating the array with the values from database on checking a condition. Lets say i have array of arr(5). Initially I made all the array items null ...

View Replies View Related

Arrays

I have an array in ASP called WordsArray() which contains several words. What I would like to do is search the array for a word, and if its not there, add it to another array ResultsArray()

So far, a loop in my code only checks the current array value, and not the rest of the array, adding the search word to the end of the resultsArray regardless.

View Replies View Related

Difference Between Environment Variables And Server Variables

can anyone tell me difference between environment variables and server variables.

View Replies View Related

Arrays Of Checkboxes

I have two related tables in my database. One stores events and the other stores a list of key topics.

I have an interface set up where users can add / edit events.

In the add event page, I am querying the "key topics" table and returning them as options (array of checkboxes). The user makes their pick, and submits. All the data saves in the 'event" table, including the primary id of the "topics".

That part works great. The problem I am having is when the EDIT event page resolves, I am trying to "check" the options that were previously saved.

First thing I do (at the top of the page) is to query the events table to pull all of the data out. I use the 'events" table to do this.

For the checkboxes, I am once again looping through them in a query that uses the "key topics" table. So the boxes are displayed, but I can't seem to get the logic right to have the appropriate ones checked. here is my current code:

View Replies View Related

Dynamic Arrays

i want to create a dynamic list or array in asp as we have arraylist in asp.net. what i want is that i want to hold the values selected by the user in a list and in advance i dont know that how much values the user will select. i also tried to use array with redim but that did not work as we can create array with only constant integer parameter.

View Replies View Related

Checkboxes And Arrays

at the moment i am creating a shopping cart of sorts. Simply the user selects the check boxes of the items he wants and clicks submit. The items are dynamically created and they could select anything from 1 to 100 items..

so processing the form is clear not possible by hard coding. How could i read all the values from the POST into an array instead of processing each item at a time.

View Replies View Related

Splitting Arrays

I have a string that looks like this: a|b|c|d%e|f| ...

I split once on "%"

ar1 = Split(Mystring, "%")

then when I try and split the ar1 by

ar2 = Split(ar1, "|")

I get error '800a000d' Type mismatch

I have tried
ar2 = Split(Cstr(ar1), "|")

How can I split this string?

View Replies View Related

Storing Arrays

I have run into a unique issue, what I want to be able to do is store a collection or array into a database or xml file. The main reason for doing this, is I don't want to use Sessions as they are volatile to server hiccups or resets. I don't want to use cookies as they are insecure, but I will use one cookie to store a UniqueID to relate to the data in the database or XML file.Can anyone think of a way to store an array in Access, MySQL, or XML file?

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved