|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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'. |
|
#2
|
|||
|
|||
|
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 ![]() |
|
#3
|
|||
|
|||
|
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. |
|
#4
|
|||
|
|||
|
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!
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Hitcounter |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|