473,786 Members | 2,574 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Arrays or Rs in Sessions : Help me plz

Hi all,

I've got an issue with session variables in asp pages. I need to make a
decision that I think you can hopefully help me out here.

When a session starts on the iss server I need to store some information in
some session variables. But this information is coming from an old dbase
system. In the beginning of this project it was just a simple static array
of information. Afterwards it turns out that this must be a dynamic array
that we could change in other asp pages.

Now, at this moment, it is even worse! There are several dynamic arrays
(max10) with a lot of records (max100) and intensive changing of data in
those arrays, sorting it and so on.

The big problem is that I cannot write the changes in those dbases in a
direct way and request them back. I know, it would help me a lot. Don't ask
why! Ask this question to the green project manager!

When the user is logging out then all changes will be save as an xml-file on
the server, and some queuing service is picking this up a minute later to
control all the data and do finally some dbase changes.

My question is: can I change the arrays into disconnected record sets and
store them into session variables? I'm using NT2K server with II6. In the
old days (nt4 IIS4) they always said that storing objects into session
variables are a bad way of programming for IIS. But in this case and with
II6???

Some comments would be nice!

Thanks in adv.
Best regards,
John
Jul 19 '05 #1
3 1423

"John" <fa***@facke.nu ll> wrote in message
news:40******** **************@ news.skynet.be. ..

My question is: can I change the arrays into disconnected record sets and
store them into session variables?
Yes. The quick way is to use the .GetRows() method of the recordsetup
object to convert a recordset into a two dimenionsal array. Either that, or
just store the data that you need in arrays you build yourself. You don't
want to store objects in session variables.
(http://www.aspfaq.com/show.asp?id=2053)
I'm using NT2K server with II6.
NT2K? he he he...

If you're using Windows 2000 Server, you're using IIS5. IIS6 is on Windows
Server 2003 only.
In the
old days (nt4 IIS4) they always said that storing objects into session
variables are a bad way of programming for IIS. But in this case and with
II6???


Still true!

If I were you, I'd go kick the project manager's rear.

Ray at work
Jul 19 '05 #2
Hoi Ray@work :)

Actually I'm receiving the data in an xml format and must convert it into a
recordset, then save it in an array using GetRows + redim the array to add
some more fields to it for internal usage.

Finally store the array into a session object.

The following page will fetch the array in the session object and convert it
back to a connectionless recordset, doing some stuff with it (sort, add,
change data, delete data,.) and the last step will be convert it back to an
array and store it back into the session object. This will be done for
several arrays on several pages :(
John: I'm using NT2K server with II6.

Ray : NT2K? he he he...
:) indeed, its win2K with IIS5

John: In the old days (nt4 IIS4) they always said that
John: storing objects into session variables are a bad
John: way of programming for IIS.

Ray : Still true!
I do remember Mr. Charles Carroll say something long ago about this issue,
but was wondering that ms-people solved this issue in some way or another.
Ray : If I were you, I'd go kick the project manager's rear.


Why do you think he's green! His balls are disabling him to breathe ;)

Do I really have to do all this work :( damn!

Thanks Ray!
John.

Jul 19 '05 #3
John wrote:
Hoi Ray@work :)

Actually I'm receiving the data in an xml format and must convert it
into a recordset, then save it in an array using GetRows + redim the
array to add some more fields to it for internal usage.
Finally store the array into a session object.

The following page will fetch the array in the session object and
convert it back to a connectionless recordset, doing some stuff with
it (sort, add, change data, delete data,.)
Why not work with the array? What is the purpose of creating a recordset
object here? I assume you are talking about creating an ad hoc array, adding
fields to the Fields collection via the Append method and putting the data
from the stored array into it. Why go through this trouble when you can more
efficiently work with the array? It's not like you are going to be able to
connect the ad hoc recordset to the data source and persist the changes
you've made.

Instead of the array, you might want to consider using an xml document,
which will be a little easier to work with than the array.
and the last step will be
convert it back to an array and store it back into the session
object. This will be done for several arrays on several pages :(
John: I'm using NT2K server with II6.

Ray : NT2K? he he he...
:) indeed, its win2K with IIS5

John: In the old days (nt4 IIS4) they always said that
John: storing objects into session variables are a bad
John: way of programming for IIS.

Ray : Still true!


I do remember Mr. Charles Carroll say something long ago about this
issue, but was wondering that ms-people solved this issue in some way
or another.


No. Especially if Access is involved. There is a way to make ADO objects
free-threaded (and therefore capable of being stored in Session), but this
should be avoided if Access is being used on the server, because Jet is
single-threaded.

If Access is not involved, you can make a registry change to cause ADO
objects to be free-threaded, using a batch file that is installed by MDAC in
the ...\project files\common files\system\ad o folder called makfre12.bat.

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #4

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

Similar topics

13
12053
by: jing_li | last post by:
Hi, you all, I am a newbee for php and I need your help. One of my coworker and I are both developing a webpage for our project using php. We have a copy of the same files in different location on the server (in our own accounts on the same machine). When I am testing both versions of our program using the same browser (IE on Windows or Konqueror on Linux) the session variables will mix up and only the latest selection or options will...
6
2275
by: Fnark! | last post by:
I am creating a shopping cart using PHP Version 4.1.2. I am creating and registering a cart object in a session. The cart object contains an array of arrays called $order whose elements are a collection of $orderline associative arrays which, in turn, hold the global POST values key 'order_code' and value 'qty' as passed in from another page. My problem is (shown by using print_r to print out the contents of the arrays) each time I...
3
1559
by: LMachado1 | last post by:
I just started with php and I'm trying to make a simple interface as follows: - user is asked to input an integers, for example: how many students do you want to enter? - user is then shown a page with number of text boxes = number he gave at the previous page - user fills out the test boxes with names of students and clicks submit - the user is sent to another page where the above names are output to
3
2481
by: Maxime Ducharme | last post by:
Hi group We have a problem with sessions in one of our sites. Sessions are used to store login info & some other infos (no objects are stored in sessions). We are using Windows 2000 Server (IIS 5.0) with ASP 3.0 (no .NET on this site). Sometime, data in session is emptied. I say "sometime"
6
2844
by: Daniel O'Connell | last post by:
Two questions here: 1. Is there any particular reason why when using stackalloc, the code byte *buffer = stackalloc byte; works, but code like byte *buffer; buffer = stackalloc byte; is considered incorrect syntax? Was this an oversight, a stylistic design, or is there a technical reason it won't work? 2. I was reading an older(circa 2000) question posted to one of these groups in which Eric Gunnerson mentions that the C# team was...
6
3807
by: Daniel Walzenbach | last post by:
Hi, I have a web application which sometimes throws an “out of memory” exception. To get an idea what happens I traced some values using performance monitor and got the following values (for one day): \\FFDS24\ASP.NET Applications(_LM_W3SVC_1_Root_ATV2004)\Errors During Execution: 7 \\FFDS24\ASP.NET Apps v1.1.4322(_LM_W3SVC_1_Root_ATV2004)\Compilations
9
1971
by: duzhidian | last post by:
Hello: There are a couple techniques to move information from different html web page to web page. 1. URL; 2. Cookie; 3. Form; 4. Session; All the examples I found are move distinguished variables from page to
3
8462
by: sjsean | last post by:
All thanks in advance for reading my post. I am new to using js and more accustomed to vbscript. I had written code which created a shopping cart into an array using vbscript and then transferred the information into a session variable. However what I didn't know was that deleting/manipulating information in an array using vbscript was not that easy. In doing some reading and research it seemed that js was more flexible in this...
5
1765
TheServant
by: TheServant | last post by:
Is there any problem with using session.auto_start in the php.ini instead of declaring session_start() on every page? Also, can sessions store arrays, and if so, is this a good idea?
0
9650
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
10363
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10164
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9962
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8992
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6748
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.