Click to See Complete Forum and Search --> : Scope of variables


Pulp
March 27th, 2001, 01:17 PM
Hi All!

I've have a web-page which retrieves some information from a database (into a recordset) and presents it. There's a print-button on the page which brings up the print-window (in IE).

After the page is printed, I'd like to update the records in the database that was printed. How can I do this???

What I've been trying to do, is to redirect to another page when printing is done. In turn, this page would do the update on the printed records.

The problem is that objRst (the variable which holds the recordset) can't be accessed from the page I'm redirecting to. I've been trying to declare the variable in an include-file, but that didn't work either (probably because I didn't populate the recordset in the include, but in another file).

I've also been trying to declare an array ("arrPrinted") and fill it with the necessary information from the recordset. I declared the variable in Global.asa to make sure it was available to every page in the site, but I got the message "Variable is undefined: 'arrPrinted'" anyway!! (yes, I did unload the site to refresh the globals)

Any ideas??
If you have any other suggestions in how to solve this, please tell me!!

Astinite
April 3rd, 2001, 11:25 AM
Is it possible to pass the info you need through the querystring?

Pulp
April 4th, 2001, 02:03 AM
It would be possible to send the ID's (of the records that's supposed to be updated) through the querystring, but the number of ID's could be several hundred which is why this might not be such a good option.

Pulp