Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

class use from client code

Status
Not open for further replies.

danidan

Programmer
Sep 15, 2001
2
AU
I'm opening a recordset and then I'm loading a data into my class (saved in another asp file), but I need to use it in "run on client" script.
How can I do it?
 
If you're opening a recordset, aren't the values already in server side script?

Maybe I don't understand fully what you are asking. Please elaborate.
 
Here's what I like to think is a pretty good FAQ that Swany and I wrote on the subject of server side vs. client side scripting, and how to communicate between the two.

Although, I admit, I'm biased. ;-)

faq329-603
 
I need to use the data on the client side and I don't want to do too many round-trips, so I want that everything in the recordset will be available to client. On the server side I'm reading the data from the recordset and store it into my class, I would like to use the class on the client side.
Thank You
 
You have a couple of options --

You could store all the values in a multidimensional client side array -- using the method that is outlined in the FAQ, but depending on how much data was in the recordset, that could be one big array --

Otherwise, you could store the recordset in a session variable (although this isn't a practice that's smiled upon because it eats up server resources, and isn't good for high traffic sites)...

I guess of the two, probably the first is the best idea, but if the recordset is huge, it could make lesser machines creak and rattle... with all the data in memory.

It's fairly well agreed upon that multiple trips to the server for data isn't necessarily a bad thing, that is, of course, if your other options provide even worse performance than this option...
 
U may Have Ur Recordset on the client Side using CourserLocation Proprety of recordset.

recordset.courserLocation = AdUseClient
We Call them Disconected Recordsets and They're Used in ADO/RDS.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top