|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
|
|
#1
|
||||
|
||||
|
only querying once, passing arrays
just wondering if this is possible. i have a page where option boxes are dynamically generated. each time they change the form is submitted, so that it can populate another option box. these are both database driven, and i was hoping that i could query the information from the database first and then load that into an array/record source. my next task would be to have that array/record source be passed once the page is submitted so that i can use the information again without re-querying the database. (its an efficiency thing) is that even possible? if not what other options do i have?
palabra encima del perra
__________________
My brain cells are like a storm trooper's armor: useless |
|
#2
|
|||
|
|||
|
are there a lot of values? you could use hidden fields in the form. this isn't very secure though. is it possible for those values to change inbetween page loads?
__________________
Programmer's Corner |
|
#3
|
||||
|
||||
|
there could potentially be alot of values. should i just query the database each time it loads and then put them into arrays? the values should not change unless the user wants to add a value, i have that part worked out already.
|
|
#4
|
|||
|
|||
|
you could try one hidden field with the values separated by some character. then on the server-side just explode that value. querying the database would be more secure but if there is already a great load on the database then alternatives must be found.
|
|
#5
|
|||
|
|||
|
If you don't mind using session variables, you could convert your database query to an array and stash it in a session variable that would be accessible to the next page.
|
|
#6
|
|||
|
|||
|
what about the ever elusive XML file or maybe disconnected record sets? I've never messed with DRS often but I'd look into seeing if that'd work....
|
|
#7
|
||||
|
||||
|
yeah i thought about drs, but how would you pass that from one page to another? i don't really want to use session variables because of how big this thing could get. anyone know if that's possible? any tutorials aboud drs? xml could be an option. i suppose it would have to be rebuilt often, but that wouldn't be too bad.
|
|
#8
|
|||
|
|||
|
DRS are saved on the hardrive I believe, I don't htink they're deleted when the application quits. if you don't feel comfortable with those you can use XML...
|
|
#9
|
||||
|
||||
|
ok xml sounds good. is there a way that asp can build the xml file? i've never had to use xml yet. any suggestions on where to get info about it? (devshed obviously)
|
|
#10
|
|||
|
|||
|
Look at the save method for ado recordsets.
http://msdn.microsoft.com/library/e...mdaobj01_20.asp Session storage works OK for reasonable sized recordsets but there are some known drawbacks to sessions, like how do they work in web farms, etc. Another usable option is to use database storage of the session information. |
|
#11
|
|||
|
|||
|
I just recommended that if you were more familiar, sounds like you understand databases better. DRS are good for what you're doing. Plus you're more familiar with the technology...
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > only querying once, passing arrays |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|