|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
heya , im currently working with a dynamic stylesheet that gets its data from a db. it works fine , but the way im stepping trough my records and adding them to the style is a bit messy , and i need to hardcode alot.
I was wondering if there is an easier way to do it with less code , maybe some loops and arrays , currently i got like 120style options , thats a lot of code repeats Below this is a sample of my code that i use to get the style-data out of the db. dim hIcolor, hIIcolor, strConnect objRS.Open "SELECT * FROM Style", strConnect hIcolor = objRS("Data") objRS.MoveNext hIIcolor = objRS("Data") objRS.MoveNext etc etc etc |
|
#2
|
||||
|
||||
|
there's a range of methods you could use. It all depends on how your data is stored and displayed.
Loops look like: do until rs.EOF ... do stuff until the recordset ends rs.movenext loop or, if you dump your RS out to an array (MUCH faster this way) for idx = 0 to ubound(aryRS,2) ... do stuff till you hit the array ubound next |
![]() |
| Viewing: Dev Articles Community Forums > Programming > ASP Development > help stepping trough a recordset |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|