ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Customizing ProductCart
  New Posts New Posts RSS Feed - Database Connection Times Out
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Database Connection Times Out

 Post Reply Post Reply
Author
Message
Donald View Drop Down
Newbie
Newbie


Joined: 01-September-2010
Location: Alabama
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote Donald Quote  Post ReplyReply Direct Link To This Post Topic: Database Connection Times Out
    Posted: 01-September-2010 at 6:13pm
Hello,
I am trying to create my own code that can create a static file for a simple list of all the brands in the store. It is a very simple script, but I must have something wrong in how I connect to the database, because when I go to the page it never loads, it just sits there till I get this message;

The maximum amount of time for a script to execute was exceeded. You can change this limit by specifying a new value for the property Server.ScriptTimeout or by changing the value in the IIS administration tools.

This is the code i am using. I really just copied snippets of code from other pages.  Any suggestions as to what I am doing wrong?


<!--#include file="adminv.asp"-->  
<!--#include file="../includes/settings.asp"-->
<!--#include file="../includes/storeconstants.asp"-->
<!--#include file="../includes/opendb.asp"-->

<%
call opendb()
query="SELECT IdBrand, BrandName, BrandLogo FROM Brands WHERE pcBrands_Active=1 ORDER BY BrandName ASC;"
    set rs=connTemp.execute(query)
 %>
<%  
iRecordsShown=0
Do While iRecordsShown < 5 And NOT rs.EOF  
%>
<%
pcIntIDBrand=rs("IdBrand")
pcvBrandsLink="viewBrands.asp?IDBrand=" & pcIntIDBrand
brandlogo = rs("BrandLogo")
brandname = rs("brandname")
%>
<% brandstring = brandstring & "<a href=" & pcvBrandsLink & ">" & "<img src='catalog/" & brandlogo & "'>" & brandname & "</a>" %>
<%
iRecordsShown=iRecordsShown + 1
                        rs.movenext
                        loop
%>

<%
if PPD="1" then
        pcStrFolder=Server.Mappath ("/"&scPcFolder&"/pc")
    else
        pcStrFolder=server.MapPath("../pc")
    end if

    Set fs=Server.CreateObject("Scripting.FileSystemObject")
    Set a=fs.CreateTextFile(pcStrFolder & "\inc_brandlist.inc",True)
    a.Write(brandstring)
    a.Close
    Set a=Nothing
    Set fs=Nothing
%>
<%
call closedb()%>
Back to Top
RobertZ View Drop Down
Groupie
Groupie


Joined: 21-January-2007
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote RobertZ Quote  Post ReplyReply Direct Link To This Post Posted: 10-September-2010 at 1:42am
Why wouldnt U just use the viewbrands.asp page?
Back to Top
Donald View Drop Down
Newbie
Newbie


Joined: 01-September-2010
Location: Alabama
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote Donald Quote  Post ReplyReply Direct Link To This Post Posted: 10-September-2010 at 11:21am
The customer wanted a simple list of the brands on the side of every page, and I wanted to limit the number of calls to the database. But I might just use a modified version of the viewbrands.asp after all. Or else I will just hard code this, as it will be rare for them to add new brands anyway.

Still, if anyone has any suggestion as to what is wrong with my database call above, I would greatly appreciate it.

Thanks!
Back to Top
Greg Dinger View Drop Down
Certified ProductCart Developers
Certified ProductCart Developers
Avatar

Joined: 23-September-2006
Location: United States
Status: Offline
Points: 238
Post Options Post Options   Thanks (0) Thanks(0)   Quote Greg Dinger Quote  Post ReplyReply Direct Link To This Post Posted: 10-September-2010 at 11:43am
Speaking for myself, I try to be as helpful around here in terms of responding to forum questions.  Where I draw the line is trying to debug someone's custom code.  I just don't (and cannot) go there.  It is our coding skills and intimate knowedge of PC on which we base our expertise, and that competes with our basic mission.
 
With that said, if you are still having a problem and want that code fixed, we'd be willing to help on a fee basis.  We also have code that generates a dynamic list of brands.  An example can be seen in www.buygolfshirts.net.  If you would like us to assist in either regard please e-mail me directly via my web site.
Back to Top
Donald View Drop Down
Newbie
Newbie


Joined: 01-September-2010
Location: Alabama
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote Donald Quote  Post ReplyReply Direct Link To This Post Posted: 10-September-2010 at 11:58am
Sorry, didn't mean to step on any toes. Since this forum is about customizing PC I assumed the question was appropriate. I was trying to use the includes and code that were already in PC, which is why I thought someone might have run into this before. I'll figure it out.

I like your add-ons. I might order your quick order entry very shortly - just as soon as I get a signature from the customer I am working :)

Back to Top
Greg Dinger View Drop Down
Certified ProductCart Developers
Certified ProductCart Developers
Avatar

Joined: 23-September-2006
Location: United States
Status: Offline
Points: 238
Post Options Post Options   Thanks (0) Thanks(0)   Quote Greg Dinger Quote  Post ReplyReply Direct Link To This Post Posted: 10-September-2010 at 12:19pm
Not stepping on my toes, or anyone else that I know of.  There are a few of us that regularly respond, and I'm just explaining my absence in this post.  Let us know if we can help - we'd be very eager to do so.
Back to Top
srinioleti View Drop Down
Newbie
Newbie


Joined: 19-June-2009
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote srinioleti Quote  Post ReplyReply Direct Link To This Post Posted: 10-September-2010 at 12:21pm
Hi Donald,


I tried to run your SQL statement ( SELECT IdBrand, BrandName, BrandLogo FROM Brands WHERE pcBrands_Active=1 ORDER BY BrandName ASC ). I don't see column name pcBrands_Active in brands table (I am using productCart v3.51a) unless you modified table to have that column. I suggest to use Response.write to debug the code.


Thank you,
Srini.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.094 seconds.