Jon,
Thanks i figured that something like that was the problem but it wasnt a top
priority page so i thought i would just send it out to see what i got back.
Thanks a lot,

Jay Patton
Web Design / Application Design
Web Pro USA
406.549.3337 ext. 203
1.888.5WEBPRO
www.webpro-usa.com
----- Original Message -----
From: "Jon Hall" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, March 05, 2001 6:16 PM
Subject: Re: page error


> Jay, you have way too many SQL queries on one page. In general looping
over
> a query should be avoided at all costs, not to mention two queries.
>
> I think a little research into SQL dot notation will help you a lot here.
I
> wish I had time to do a longer example for you, but I gotta get some work
> done ;-)
>
> Example:
> <cfquery datasource="#dsn#" name="getStuff">
> SELECT EventManager.id, EventManager.RodeoDate, EventManager.EyebrowSize,
> RodeoManager.Score, RodeoManager.Winner
> FROM EventManager, RodeoManager
> WHERE EventID = '#eventID#'
> </cfquery>
>
> This code wont work in your app, but I hope you see the power of having a
> peice of information that matches in the two tables. Instead of looping
over
> a query, all you would have to do is output one query! I believe the
EventID
> might be your key. It's hard to tell from the code.
>
> HTH
>
> jon
>
>
> ----- Original Message -----
> From: "Jay Patton" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Monday, March 05, 2001 7:09 PM
> Subject: page error
>
>
> > Can someone maybe tell me why i get this error on the web but not on my
> local machine? its only when this page is run. (both local and web are SQL
> 7) here is my code:(followed by the error)
> >
> > <!-- Start Code -->
> >
> > <!-- Get Name According to Url.ContestantID -->
> > <cfquery name="GetName"
> >          datasource="#datasource#"
> >          dbtype="ODBC"
> >          username="#username#"
> >          password="#password#">
> > SELECT *
> > FROM ContestantManager
> > WHERE ContestantID = #url.ContestantID#
> > </cfquery>
> >
> > <!-- Get Events -->
> > <cfquery name="GetEvents"
> >          datasource="#datasource#"
> >          dbtype="ODBC"
> >          username="#username#"
> >          password="#password#">
> > SELECT *
> > FROM EventManager
> > </cfquery>
> >
> > <!-- Get Results -->
> > <cfquery name="GetResults"
> >          datasource="#datasource#"
> >          dbtype="ODBC">
> > SELECT RodeoID, EventID, SUM (AdjPoints) as AdjPoints, SUM (Points) as
> Points, SUM (MoneyEarned) as TotalMoneyAll, NotAllAround
> > FROM ResultsManager
> > WHERE ContestantID = #url.ContestantID#
> > GROUP BY RodeoID, EventID, NotAllAround
> > ORDER BY '#GetEvents.EventName#'
> > </cfquery>
> > <cfoutput>
> > <html>
> > <head>
> > <title>NSPRA - Contestant Results for #GetName.LastName#,
> #GetName.FirstName# (#GetName.Age#)</title>
> > </head>
> >
> > <body bgcolor="##FFFFFF">
> > <table width="590" border="0" cellspacing="2" cellpadding="2">
> >   <tr>
> >     <td width="146"><font face="Verdana, Arial, Helvetica, sans-serif"
> size="2">Individual Results For:</font></td>
> >     <td width="430"><font face="Verdana, Arial, Helvetica, sans-serif"
> size="2">#GetName.LastName#, #GetName.FirstName# (#GetName.Age#)
> #GetName.BirthDate# #GetName.CardNumber#</font></td>
> >   </tr>
> > </table>
> > <br>
> > <table width="937" border="0" cellspacing="2" cellpadding="2">
> >   <tr>
> >     <td width="137"><b><font face="Verdana, Arial, Helvetica,
sans-serif"
> size="1">Rodeo</font></b></td>
> >     <td width="226"><b><font face="Verdana, Arial, Helvetica,
sans-serif"
> size="1">Event</font></b></td>
> >     <td width="105"><b><font face="Verdana, Arial, Helvetica,
sans-serif"
> size="1">Points</font></b></td>
> >     <td width="122"><b><font face="Verdana, Arial, Helvetica,
sans-serif"
> size="1">Adj. Points</font></b></td>
> >     <td width="118"><b><font face="Verdana, Arial, Helvetica,
sans-serif"
> size="1">Money Won</font></b></td>
> >     <td width="83"><b><font face="Verdana, Arial, Helvetica, sans-serif"
> size="1">Total Points</font></b></td>
> >     <td width="102"><b><font face="Verdana, Arial, Helvetica,
sans-serif"
> size="1">Include in AllAround (Y/N)</font></b></td>
> >   </tr>
> >   <cfloop query="GetResults">
> >   <tr bgcolor="#IIf(GetResults.CurrentRow  Mod 2, DE('FFFFE7'),
> DE('99CC99'))#">
> >     <td width="137"><font face="Verdana, Arial, Helvetica, sans-serif"
> size="1"><cfquery name="RodeoName" datasource="#datasource#"
> username="#username#" password="#password#" dbtype="ODBC">SELECT * FROM
> RodeoManager WHERE RodeoID =
'#GetResults.RodeoID#'</cfquery>#RodeoName.Rode
> oName#</font></td>
> >     <td width="226"><font face="Verdana, Arial, Helvetica, sans-serif"
> size="1"><cfquery name="EventName" datasource="rodeo" dbtype="ODBC">SELECT
*
> FROM EventManager WHERE EventID =
> '#GetResults.EventID#'</cfquery>#EventName.EventName#</font></td>
> >     <td width="105"><font face="Verdana, Arial, Helvetica, sans-serif"
> size="1">#GetResults.Points#</font></td>
> >     <td width="122"><font face="Verdana, Arial, Helvetica, sans-serif"
> size="1">#GetResults.AdjPoints#</font></td>
> >     <td width="118"><font face="Verdana, Arial, Helvetica, sans-serif"
> size="1"><cfquery name="EventMoney" datasource="rodeo" dbtype="ODBC"
> username="#username#" password="#password#">SELECT MoneyEarned FROM
> ResultsManager WHERE EventID =
>
'#GetResults.EventID#'</cfquery>#NumberFormat(EventMoney.MoneyEarned,"$____.
> __")#</font></td>
> >     <td width="83"><font face="Verdana, Arial, Helvetica, sans-serif"
> size="1"><!--- #GetResults.TotalPoints# ---></font></td>
> >     <td width="102"><font face="Verdana, Arial, Helvetica, sans-serif"
> size="1"><cfif GetResults.NotAllAround EQ "0">Y<cfelseif
> GetResults.NotAllAround EQ "1"><b>N</b></cfif></font></td>
> >   </tr>
> >   </cfloop>
> >   <tr>
> >     <td width="137"><b><font face="Verdana, Arial, Helvetica,
sans-serif"
> size="1">Rodeo</font></b></td>
> >     <td width="226"><b><font face="Verdana, Arial, Helvetica,
sans-serif"
> size="1">Event</font></b></td>
> >     <td width="105"><b><font face="Verdana, Arial, Helvetica,
sans-serif"
> size="1">Points</font></b></td>
> >     <td width="122"><b><font face="Verdana, Arial, Helvetica,
sans-serif"
> size="1">Adj. Points</font></b></td>
> >     <td width="118"><b><font face="Verdana, Arial, Helvetica,
sans-serif"
> size="1">Money Won</font></b></td>
> >     <td width="83"><b><font face="Verdana, Arial, Helvetica, sans-serif"
> size="1">Total Points</font></b></td>
> >     <td width="102"><b><font face="Verdana, Arial, Helvetica,
sans-serif"
> size="1">Include in AllAround (Y/N)</font></b></td>
> >   </tr>
> > </table>
> > <br>
> > <table width="590" border="0" cellspacing="2" cellpadding="2">
> >   <tr>
> >     <td width="201"><font face="Verdana, Arial, Helvetica, sans-serif"
> size="1">Total Money Won (All Events):</font></td>
> >     <td width="375"><font face="Verdana, Arial, Helvetica, sans-serif"
> size="1"><cfquery name="TotalMoney" datasource="#datasource#"
> username="#username#" password="#password#" dbtype="ODBC">SELECT SUM
> (MoneyEarned) as TotalMoneyAll FROM ResultsManager WHERE ContestantID =
>
'#url.ContestantID#'</cfquery>#NumberFormat(TotalMoney.TotalMoneyAll,"$____.
> __")#</font></td>
> >   </tr>
> > </table>
> > </cfoutput>
> > </body>
> > </html>
> >
> > <!--  End Code -->
> >
> > <!-- Start Error -->
> > ODBC Error Code = ()
> >
> >
> > Timed-out trying to get a connection to RODEO. The connection limit has
> been reached.
> >
> >
> >
> > The error occurred while processing an element with a general identifier
> of (CFQUERY), occupying document position (23:1) to (25:23).
> >
> > <!-- End Error -->
> >
> > Thanks,
> >
> > Jay Patton
> > Web Design / Application Design
> > Web Pro USA
> > 406.549.3337 ext. 203
> > 1.888.5WEBPRO
> > www.webpro-usa.com
> >
> >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to