Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > Adobe Web Programming > Dreamweaver (all versions)
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Dreamweaver (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #11 (permalink)  
Old November 24th, 2005, 06:57 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Sounds like you missed a MoveNext somewhere...

If that doesn't help, can you post your code?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
  #12 (permalink)  
Old November 25th, 2005, 04:39 AM
Friend of Wrox
 
Join Date: May 2005
Location: tehran, tehran, Iran.
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hastikeyvan
Default

thank you.i will post my code to your personal mail if it doesn't any matter for you.

Reply With Quote
  #13 (permalink)  
Old November 25th, 2005, 04:49 AM
Friend of Wrox
 
Join Date: May 2005
Location: tehran, tehran, Iran.
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hastikeyvan
Default

this is my codes for a tr and sorry if i is very much.
other trs have the sam codes with different ifs
<tr>
                <td>&nbsp;</td>
                <td nowrap><strong>4083</strong></td>
                <td nowrap class="unnamed1">&nbsp;</td>
                <td nowrap><strong>Intake
                  Silencer</strong></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                 if (rs("unitNo")="05" and rs("HGNo")="4083") then
              Subheading
              end if
              rs.movenext()

wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="06" and rs("HGNo")="4083") then
              Subheading
              end if
              rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="07" and rs("HGNo")="4083") then
              Subheading
              end if
              rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="08" and rs("HGNo")="4083") then
              Subheading
              end if
              rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="09" and rs("HGNo")="4083") then
              Subheading
              end if
              rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="10" and rs("HGNo")="4083") then
              Subheading
              end if
              rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="11" and rs("HGNo")="4083") then
              Subheading
              end if
              rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="12" and rs("HGNo")="4083") then
               Subheading
               end if
               rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="13" and rs("HGNo")="4083") then
               Subheading
               end if
               rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="14" and rs("HGNo")="4083") then
              Subheading
              end if
              rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="15" and rs("HGNo")="4083") then
               Subheading
               end if
               rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                 if (rs("unitNo")="16" and rs("HGNo")="4083") then
              Subheading
              end if
              rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="17" and rs("HGNo")="4083") then
              Subheading
              end if
              rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="18" and rs("HGNo")="4083") then
              Subheading
              end if
              rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="19" and rs("HGNo")="4083") then
              Subheading
              end if
              rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="20" and rs("HGNo")="4083") then
               Subheading
               end if
               rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="21" and rs("HGNo")="4083") then
               Subheading
               end if
               rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="22" and rs("HGNo")="4083") then
              Subheading
              end if
              rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="23" and rs("HGNo")="4083") then
               Subheading
               end if
               rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="24" and rs("HGNo")="4083") then
               Subheading
               end if
               rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="25" and rs("HGNo")="4083") then
              Subheading
              end if
              rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="26" and rs("HGNo")="4083") then
               Subheading
               end if
               rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="27" and rs("HGNo")="4083") then
              Subheading
              end if
              rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="28" and rs("HGNo")="4083") then
              Subheading
              end if
              rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="29" and rs("HGNo")="4083") then
              Subheading
              end if
              rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="30" and rs("HGNo")="4083") then
              Subheading
              end if
              rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="31" and rs("HGNo")="4083") then
              Subheading
              end if
              rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="32" and rs("HGNo")="4083") then
              Subheading
              end if
              rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="33" and rs("HGNo")="4083") then
              Subheading
              end if
              rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="34" and rs("HGNo")="4083") then
              Subheading
              end if
              rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="35" and rs("HGNo")="4083") then
              Subheading
              end if
              rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="36" and rs("HGNo")="4083") then
              Subheading
              end if
              rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="37" and rs("HGNo")="4083") then
               Subheading
               end if
               rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="38" and rs("HGNo")="4083") then
               Subheading
               end if
               rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="39" and rs("HGNo")="4083") then
               Subheading
               end if
               rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="40" and rs("HGNo")="4083") then
               Subheading
               end if
               rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="41" and rs("HGNo")="4083") then
               Subheading
               end if
               rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="42" and rs("HGNo")="4083") then
               Subheading
               end if
               rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="43" and rs("HGNo")="4083") then
               Subheading
               end if
               rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="44" and rs("HGNo")="4083") then
               Subheading
               end if
               rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="45" and rs("HGNo")="4083") then
               Subheading
               end if
               rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="46" and rs("HGNo")="4083") then
               Subheading
               end if
               rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="47" and rs("HGNo")="4083") then
               Subheading
               end if
               rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="48" and rs("HGNo")="4083") then
               Subheading
               end if
               rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="49" and rs("HGNo")="4083") then
               Subheading
               end if
               rs.movenext()
wend%></td>
                <td class="unnamed1">&nbsp;</td>
                <td><%rs.movefirst
while not rs.eof
                if (rs("unitNo")="50" and rs("HGNo")="4083") then
               Subheading
               end if
               rs.movenext()
wend%></td>
              </tr>
thank you Imar for you attentions.

Reply With Quote
  #14 (permalink)  
Old November 26th, 2005, 01:00 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

What kind of data do you have in your recordset that requires this million loops? Isn't it possible to order the recordset once when querying the database, and then looping through it only once, using something like a Select Case statement to determine the current record and act upon it?

Can you explain the business logic behind this page a little? There may be much simpler / more efficient ways to do it.

If you need to keep your current page structure, I suggest you look into the Filter property of the Recordset object. While filtering isn't very efficient itself and is much better done at the database level in your SELECT statement, I am sure it beats looping through the same recordset a billion times. Check out this MSDN article for more information: http://msdn.microsoft.com/library/de...dprofilter.asp

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
  #15 (permalink)  
Old November 27th, 2005, 02:33 AM
Friend of Wrox
 
Join Date: May 2005
Location: tehran, tehran, Iran.
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hastikeyvan
Default

I have some HGs that each HG has 50 units and this page is a main report about our project that tells each HG of each units situation.
I wrote this program with a while loop for a table but it showed each record in one table and there was many tables(the database is very huge with many columns that we get different types of reports from it.in addition i should write the HGs and units dynamically.HGs are placed in a column at the left of the page and units are placed in a row on top of the page.I thought this way my program will work but it takes too much time to load.(i changed the time out time to <% Server.ScriptTimeout = 660 %>and it is working now but takes about 5 minuts to load)
if there is a better structure please guide me.
thank you



Reply With Quote
  #16 (permalink)  
Old November 27th, 2005, 05:47 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Quote:
quote:if there is a better structure please guide me.
Well, it all depends on your design. That's why I asked about business logic. I also depends on the amount of data in your database. Do you get all HGs (whatever they are) at once? And did you try it using the Filter property I showed earlier? That should speed things up....

What is an HG and how much units does it have? What's the *logic* about presenting the data on the page? How does your database look like? How are things related?

Without this information, it's hard to propose a better solution....

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
  #17 (permalink)  
Old November 27th, 2005, 07:43 AM
Friend of Wrox
 
Join Date: May 2005
Location: tehran, tehran, Iran.
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hastikeyvan
Default

HGs are some materials that has different names and numbers.and each unit has some HGs in it.we have 50 units and about 60 HGs for each unit.there is a very huge data in the database(about 3000 records with 50 columns in SQL database)and this data is getting more and more.the program has a function that compare the situation of each HG and shows its situation in its special cell in the table and because of that i should write those ifs to verify the unit and HG.this program is written for project planning and we want to control each HG by this table.

Reply With Quote
  #18 (permalink)  
Old November 28th, 2005, 03:02 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Since you didn't answer most of my other questions, I can only assume you're trying things out right now? Is the Filter property any good to you?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Weapon of Choice by Fatboy Slim (Track 8 from the album: Halfway Between the Gutter and Stars) What's This?
Reply With Quote
  #19 (permalink)  
Old November 29th, 2005, 12:56 AM
Friend of Wrox
 
Join Date: May 2005
Location: tehran, tehran, Iran.
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hastikeyvan
Default

I used filter property(where filter)and didnt write select *( i wrote just the coulmns that was needed in my program).but yet it is a very huge data in recordset that should be checked.can i use ado for checking data instead of recordset?and if i can use it how?if not how can i reduce this time of load?i couldn't use more filters because it wouldn't show all Hgs that i wanted to have.
please help me to solve it

Reply With Quote
  #20 (permalink)  
Old November 29th, 2005, 03:24 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Check my previous replies; I asked a bunch of questions that you need to answer before I can help you:

How is the database designed? What tables does it have and how are they related? How many HG records do your query? How many records are there in your recordset when you start looping. How does your select statement look like? Do you use a proper WHERE clause to filter records at the database level?

What kind of data do you have in your recordset that requires this million loops? Isn't it possible to order the recordset once when querying the database, and then looping through it only once, using something like a Select Case statement to determine the current record and act upon it?

If I were you, I'd first determine what exactly it is you want. Draw it out on a piece of paper, or try to write pseudo code of how you'd like the application to work. If you do that, things will be much clearer to you (and us).

I believe I asked even more questions, but I didn't look them up all.

The suggestion about pseudo code is really important. Try to visualize what you want the app to do. Taking one step back and stop trying to fix your problem through code often helps. It may be a design issue instead of a code issue.

Then explain us what it does and we might ne able to help. Right now, all I now is that a HG has units and that you loop an awful lot.
Not really enough information to make a balanced decision.

Imar

---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
loop through static list of values? mister_mister XSLT 6 January 4th, 2008 11:48 AM
help writing dynamic form data to dynamic table ublend Classic ASP Professional 1 June 1st, 2007 08:08 AM
Dynamic Checkboxes using dynamic Select Values bsheridan Classic ASP Databases 0 March 12th, 2006 10:17 AM
Dynamic table values not returned in Netscape jminteer Classic ASP Professional 1 December 16th, 2005 03:43 PM
static HTML table border problem Robin1 HTML Code Clinic 4 August 12th, 2004 04:58 AM



All times are GMT -4. The time now is 06:15 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.