Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Problem with global variables
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Problem with global variables

 Post Reply Post Reply Page  <1234>
Author
Diep-Vriezer View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 August 2003
Location: Netherlands
Status: Offline
Points: 831
Post Options Post Options   Thanks (0) Thanks(0)   Quote Diep-Vriezer Quote  Post ReplyReply Direct Link To This Post Posted: 21 December 2003 at 4:04am
Yeah, but can't you either cache it (using the SessionID) or just put it in the session?
Gone..
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 21 December 2003 at 4:50am

Yes you could use cache, heres an example:

Dim example(1) As String

example(0) = "Hello"
example(1) = "Hi"


'Add Item to cache
Cache.Insert("Example", Source, New CacheDependency(example))

'Read from cache
Dim example As String = Cache("Example")

Back to Top
Diep-Vriezer View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 August 2003
Location: Netherlands
Status: Offline
Points: 831
Post Options Post Options   Thanks (0) Thanks(0)   Quote Diep-Vriezer Quote  Post ReplyReply Direct Link To This Post Posted: 21 December 2003 at 5:05am
Can you also DIM example as an array?
Gone..
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 21 December 2003 at 5:38am
Yes you can.
Back to Top
sabrin514 View Drop Down
Newbie
Newbie


Joined: 19 December 2003
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote sabrin514 Quote  Post ReplyReply Direct Link To This Post Posted: 22 December 2003 at 8:32am

Thank you everyone for the responses. I didn't get a chance to read them over the weekend.

I have never used the cache feature, but it sounds pretty cool.  Is this information stored server side or client side, and are there any benefits to using cache as opposed to a session variable?

To answer the question about information being stored, the application is basically one that that is used by hotline staff who take calls/complainants. The one type of object (project), contains all the information about the complainant itself. There is only one of this type of object per case. The other type of object (entity) contains ionformation about a person or a company. There can actually be up to 3 of this these per call. The complainant, the caller (if its not the same as the complainant, and the target of the complaint.

 

Back to Top
Diep-Vriezer View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 August 2003
Location: Netherlands
Status: Offline
Points: 831
Post Options Post Options   Thanks (0) Thanks(0)   Quote Diep-Vriezer Quote  Post ReplyReply Direct Link To This Post Posted: 22 December 2003 at 8:38am

Cache is server side ofcourse  I think cache might rescue you here. Google around abit and find some tutorials on it.

Gone..
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 22 December 2003 at 8:55am

Well obviously by its name cache is stored on the servers memory for quick access so it might be better to use cache. You can store anything in them just like in a session but there quicker. If you store loads of stuff in there (like a dataset containing a 6mb access database) and store it for every user on your site and you have lots of users your server wont be a happy bunny this christmas. But it will have the same effect with a session object. Anyhow point is dontn store lots of info in cache. Btw heres the microsoft tutorial about it.

http://www.dotnetjunkies.com/quickstart/aspplus/doc/datacach ing.aspx

Back to Top
sabrin514 View Drop Down
Newbie
Newbie


Joined: 19 December 2003
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote sabrin514 Quote  Post ReplyReply Direct Link To This Post Posted: 22 December 2003 at 9:17am

Thanks, I'll check out the tutorial on caching.

Storing my objects to a session variable worked like a charm. The only problem is that I can't seem to access the properties of my objects directly from the session variable and have to assign the objects stored in the session variable to objects each time I want to read or modify the properties.

Is there an easier way to do this? I feel like maybe I am missing something.

Back to Top
 Post Reply Post Reply Page  <1234>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.