Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Slow Asp-page
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Torborg
Junior Member

Norway
109 Posts

Posted - 28 October 2008 :  17:47:40  Show Profile
I'm not sure where to post this. But i have a photo album. In a table, it lists the members that have added a photo. The problem is that with several members this list is VERY slow, although the table looks very simple.

http://www.bio.no/enbiolog/testforum/photoalbum.asp

With help from fiends we have tried to fix the code. To make it better.
http://www.bio.no/enbiolog/testforum/photoalbum_new.txt
But it gives this error:

Microsoft JET Database Engine error '80040e10'
No value given for one or more required parameters.
/bio/enbiolog/testforum/photoalbum.asp, line 11

(Old code: http://www.bio.no/enbiolog/testforum/photoalbum.txt)

I really hope you can help



<

Edited by - Torborg on 28 October 2008 18:12:22

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 31 October 2008 :  08:40:24  Show Profile
There is nothing different between those files with the exception of commented lines which have no effect. I visited the photo albums, looked at both samples' accounts and they worked properly (if a bit slowly).<
Go to Top of Page

Torborg
Junior Member

Norway
109 Posts

Posted - 31 October 2008 :  15:42:44  Show Profile
Oh, sorry!

This is the one in use:
http://www.bio.no/enbiolog/testforum/photoalbum_old.txt

It is slow when there are several users. Take a "quick" look here at the active forum:
http://www.bio.no/enbiolog/photoalbum.asp

This is how we tried to fix:
http://www.bio.no/enbiolog/testforum/photoalbum_new.txt
Used "group by" as advised by the host.

And this is how it (doesn't) work:
http://www.bio.no/enbiolog/testforum/photoalbum_new.asp
<

Edited by - Torborg on 31 October 2008 15:56:33
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 31 October 2008 :  16:21:33  Show Profile
Your revision didn't work for several reasons. You cannot count using only a wild card when trying to extract data from multiple sources and you cannot compare a variable to a non-existent one. Also, you have no need to group by a secondary level of name (grouping by ID will already do that).

Try this line:

strsql = "SELECT a.MEMBER_ID, a.M_NAME, Count(b.I_ID), Max(b.I_DATE) FROM " & strMemberTablePrefix & "MEMBERS a, " & strTablePrefix & "IMAGES b WHERE a.MEMBER_ID = b.I_MID GROUP BY a.MEMBER_ID ORDER BY a.M_NAME ASC"
<
Go to Top of Page

Torborg
Junior Member

Norway
109 Posts

Posted - 31 October 2008 :  16:36:11  Show Profile
Thanks!

This time I get the error:

You tried to execute a query that does not include the specified expression 'M_NAME' as part of an aggregate function.

http://www.bio.no/enbiolog/testforum/photoalbum_new.asp


<
Go to Top of Page

Torborg
Junior Member

Norway
109 Posts

Posted - 31 October 2008 :  17:21:49  Show Profile
I used : GROUP BY a.MEMBER_ID, a.M_NAME ORDER BY a.M_NAME ASC" Afterall. Then I get this error:

Subscript out of range: 'ubound'

http://www.bio.no/enbiolog/testforum/photoalbum_new2.asp

the code:

http://www.bio.no/enbiolog/testforum/photoalbum_new2.txt<

Edited by - Torborg on 31 October 2008 17:27:53
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 31 October 2008 :  21:16:19  Show Profile
I see what is wrong. You cannot use imgcount or Ldate in the subscript range without specifying it earlier. Change the sql line to say:
strsql = "SELECT a.MEMBER_ID, a.M_NAME, Count(b.I_ID) AS imgCount, Max(b.I_DATE) AS imgLDate FROM " & strMemberTablePrefix & "MEMBERS a, " & strTablePrefix & "IMAGES b WHERE a.MEMBER_ID = b.I_MID GROUP BY a.MEMBER_ID ORDER BY a.M_NAME ASC"
<
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 01 November 2008 :  10:07:15  Show Profile
The photoalbum mod retrieves all the members from the database then tries to work with that data. That's a whole lotta data if you got a big forum. It's a wonder I haven't seen other members complain about it.<

Support Snitz Forums
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 01 November 2008 :  11:40:16  Show Profile
I suppose it's all in the purpose of a forum as to how much the photo album mod is actually used. His particular forum specializes in pictures of bugs. I think the photo gallery mod would better suit him, but maybe the changes to his script will improve things. It reduces the database calls by half.<
Go to Top of Page

Torborg
Junior Member

Norway
109 Posts

Posted - 01 November 2008 :  13:25:38  Show Profile
Thanks, and hello Davio

Yes the problem was the members list. And I have solved this to day (with help from friends). It has redused the database calls by much much more then half.

I love this mod (and snitz ) and we allready have more than 3400 pictures of all kinds of biological species, not only bugs .<

Edited by - Torborg on 01 November 2008 13:30:52
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.32 seconds. Powered By: Snitz Forums 2000 Version 3.4.07