ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 28th, 2005, 07:36 AM
krakrMann krakrMann is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 9 krakrMann User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 51 m 55 sec
Reputation Power: 0
Hitcounter

Hello. I found some code off of CfmCentral. This hit counter is giving me problems. Its trying to find a database that doesnt exist. Could someone please give me a little direction? The DSN resides at /Inetpub/projects/gg/db/ggdb.mdb All the connections in the CF Admin work fine. I cant figure out why the CF server is trying to query C:\BlackStoneB2\db\slserver54\logging\tblHitCounter.mdb

application.cfm
<cfapplication name="GGDB" clientmanagement="yes" sessionmanagement="yes" setclientcookies="yes" setdomaincookies="yes">
<cfset Application.Connection = "ggdb">


hc.cfm
<cfquery name="rsGetHitCounter" datasource="#Application.Connection#">
SELECT tblHitCounter.hid, tblHitCounter.hitcounter FROM tblHitCounter
</cfquery>
<cfif rsGetHitCounter.RecordCount EQ 0>
<!--- if there are no hits, then insert value=1 into databasename: hitcounter, fieldname:hit_count --->
<cfquery name="rsInsertHit" datasource="#Application.Connection#">
INSERT INTO tblHitCounter ( tblHitCounter.hitcounter ) VALUES ( 1 )
</cfquery>
<cfelse>
<center>
<b>HitCounter:</b> <cfoutput query="rsGetHitCounter">#rsGetHitCounter.hitcounter#</cfoutput>
</center>
</cfif>
<cfquery name="rsUpdateHit" datasource="#Application.Connection#">
<!--- update databasename: hitcounter, fieldname:hit_count by 1 --->
UPDATE tblHitCounter.hitcounter SET tblHitCounter.hitcounter = tblHitCounter.hitcounter
+ 1
</cfquery>


Error
Error Executing Database Query.
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Could not find file 'C:\BlackStoneB2\db\slserver54\logging\tblHitCounter.mdb'.

Reply With Quote
  #2  
Old January 28th, 2005, 09:23 AM
VelvettFogg VelvettFogg is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 34 VelvettFogg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 13 m 46 sec
Reputation Power: 4
Have you defined ggdb as a valid datasource in the ColdFusion Administrator? And if you have, double check to see where that datasource is pointing.

Luck

Reply With Quote
  #3  
Old January 28th, 2005, 01:34 PM
krakrMann krakrMann is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 9 krakrMann User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 51 m 55 sec
Reputation Power: 0
Yes, all of my DSN's are working perfectly. Although I did neglect to say that I am working with Blackstone Beta 2.

In all honesty, I think this is more of a fluke, than a problem with my code. Is there a Blackstone Beta 2 knowledge base that I may look at?

Or is there another hitcounter code, that I use?

And btw, thank you for taking the time to reply to my question.

Reply With Quote
  #4  
Old January 29th, 2005, 01:43 AM
krakrMann krakrMann is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 9 krakrMann User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 51 m 55 sec
Reputation Power: 0
I never did find out what the problem was. However, I just wrote a very simple script that would do what I needed. Thanks for the help!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > Hitcounter


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway