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:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old April 30th, 2008, 05:25 PM
dba_raf dba_raf is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 6 dba_raf User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 54 m 13 sec
Reputation Power: 0
How connect my project

have folder tom on another machine and I'd like to move in my server.
I created CF data source name = raf
I tried with url
but I get this error (after connection):

Error Executing Database Query.
Data source not found.
The error occurred in E:\Inetpub\wwwroot\tom\afmlogincheck.cfm: line 31

29 : SELECT 1 FROM afm_users
30 : WHERE user_name = {fn UCASE( '#AfmUName#' )}
31 : AND user_pwd = {fn UCASE( '#AfmPWord#' )}
32 : </cfquery>
33 :

This is my afmlogincheck.cfm
[CODE]
<CFQUERY NAME="test_AfmUName" DATASOURCE = "#Cookie.AFMDSN#" >
SELECT 1 FROM afm_users
WHERE user_name = {fn UCASE( '#AfmUName#' )}
AND user_pwd = {fn UCASE( '#AfmPWord#' )}
</cfquery>

<body>

<TABLE>
<tr><td><a href="/afm/afm_hotlist.cfm">
<IMAGE SRC="/afm/afminet.gif" ALT="ARCHIBUS/FM" ALIGN="CENTER" BORDER="0"></a></td>
<td colspan=3 ALIGN=LEFT>
<Font face="Arial" size="+2">
<b>ARCHIBUS/FM Web Central Login validation</b></FONT>
</td>
</tr>
</TABLE>

<CFIF #test_AfmUName.RecordCount# LT 1>
<CFLOCATION url="afmLogin.cfm?var_invalid=true">
<CFELSE>
<CFCOOKIE NAME="AfmUserName" VALUE=#AfmUName#>
<CFIF IsDefined("cookie.AFM_SCRIPTNAME") IS "TRUE">
<cfoutput>
<SCRIPT language="JavaScript1.2">
self.location = "#cookie.AFM_SCRIPTNAME#"
</script>
</cfoutput>
<CFELSE>
<CFLOCATION url="/afm/afm_hotlist.cfm">
</cfif>
</CFIF>

</body>
</html>


this is my application.cfm:


<CFIF #IsDefined("cookie.AFMDSN")# IS "FALSE">
<CFCOOKIE NAME="AFMDSN" VALUE="wcentral">
</CFIF>

<!--- Please change the value to TRUE if using Afm Security ----->
<CFCOOKIE NAME="UseAfmSecurity" VALUE="TRUE">
<CFIF #Cookie.UseAfmSecurity# IS "TRUE">
<CFIF #IsDefined("cookie.AfmUserName")# IS "FALSE" OR (#cookie.AfmUserName# IS "") >
<CFIF #IsDefined( "AfmUName" )# IS "FALSE">
<CFIF (CGI.SCRIPT_NAME IS NOT "/afm/afmLogin.cfm") AND (CGI.SCRIPT_NAME IS NOT "/afm/AfmLoginCheck.cfm") AND (CGI.SCRIPT_NAME IS NOT "/afm/reports/projectchooser.cfm") AND (CGI.SCRIPT_NAME IS NOT "/afm/reports/projectset.cfm")>
<CFCOOKIE name="AFM_SCRIPTNAME" value="#CGI.SCRIPT_NAME#">
<SCRIPT language="JavaScript1.2">
self.location = "/afm/AfmLogin.cfm"
</script>
</CFIF>
</CFIF>
</CFIF>
</CFIF>

<!--- Please change the value to TRUE for international version ----->
<CFCOOKIE NAME="UseInternationalDates" VALUE="FALSE">

<CFIF #Cookie.UseInternationalDates# IS "FALSE">
<CFCOOKIE NAME="DateSeperator" Value="/">
<CFCOOKIE NAME="AFMDateFormat" VALUE="mm/dd/yyyy">
<CFCOOKIE NAME="AFMDateType" VALUE="0">
<CFCOOKIE NAME="AFMTimeFormat" VALUE="hh:mm:sstt">
<cfelse>
<!--- Please change the value of seperator (i.e. "." ) for international version if necessary----->
<CFCOOKIE NAME="DateSeperator" Value="-">
<!--- Please change the value for international version if necessary----->
<CFCOOKIE NAME="AFMDateFormat" VALUE="dd-mm-yyyy">
<!--- Please change the value for international version if necessary----->
<CFCOOKIE NAME="AFMDateType" VALUE="1"> <!--- 0: mm/dd/yyyy; 1: dd/mm/yyyy; .....seperator does not matter---->
<!--- Please change the value for international version if necessary----->
<CFCOOKIE NAME="AFMTimeFormat" VALUE="HH:mm:ss">
</cfif>

<!--- Please change the value for international version if necessary----->
<!---- Set of characters that are used to show how ColdFusion should display the date:
d -- Day of the month as digits with no leading zero for single-digit days.
dd -- Day of the month as digits with a leading zero for single-digit days.
ddd -- Day of the week as a three-letter abbreviation.
dddd -- Day of the week as its full name.
m -- Month as digits with no leading zero for single-digit months.
mm -- Month as digits with a leading zero for single-digit months.
mmm -- Month as a three-letter abbreviation.
mmmm -- Month as its full name.
y -- Year as last two digits with no leading zero for years less than 10.
yy -- Year as last two digits with a leading zero for years less than 10.
yyyy -- Year represented by four digits.
----->
<CFCOOKIE NAME="AFMDATEDDDDMMMDDYYYY" VALUE="dddd, mmm dd, yyyy">

<!--- Please change the value for international version if necessary - Copy and Paste ----->
<!---- Set Locale to:
Dutch (Belgian)
Dutch (Standard)
English (Australian)
English (Canadian)
English (New Zealand)
English (UK)
English (US)
French (Belgian)
French (Canadian)
French (Standard)
French (Swiss)
German (Austrian)
German (Standard)
German (Swiss)
Italian (Standard)
Italian (Swiss)
Norwegian (Bokmal)
Norwegian (Nynorsk)
Portuguese (Brazilian)
Portuguese (Standard)
Spanish (Mexican)
Spanish (Modern)
Spanish (Standard)
Swedish
----->
<cfset locale = SetLocale("Italian (Standard)")>

<!---- DO NOT CHANGE EXCEPT FOR DATEFORMAT---->
<cffunction name="AFM_LSDateFormat">
<cfargument name="AFM_Date" required="YES">
<cfargument name="AFM_DateFormat" required="YES">
<cfif AFM_Date is not "">
<!--- Please change format (i.e. mm/dd/yyyy) to your international version ----->
<cfset AFM_Date = "#DateFormat(AFM_Date, "dd/mm/yyyy")# 00:00:00">
<cfreturn LSDateFormat(AFM_Date,AFM_DateFormat)>
<else>
<cfreturn "">
</cfif>
</cffunction>

<!---- DO NOT CHANGE ---->
<cffunction name="AFM_LSTimeFormat">
<cfargument name="AFM_Time" required="YES">
<cfargument name="AFM_TimeFormat" required="YES">
<cfif AFM_Time is not "">
<cfreturn LSTimeFormat(AFM_Time,AFM_TimeFormat)>
<else>
<cfreturn "">
</cfif>
</cffunction>

Which file I must modify to connect at my project tom?
Have someone any idea?
Thanks

Reply With Quote
  #2  
Old April 30th, 2008, 06:16 PM
kiteless kiteless is offline
Moderator
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,475 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 17 h 7 m 51 sec
Reputation Power: 42
Sorry, but unless you can pare that down to a simple example that demonstrates the problem, I can't help you. I just don't have the time to go through all that code.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian.
How to Post a Question in the Forums

Reply With Quote
  #3  
Old April 30th, 2008, 06:24 PM
kiteless kiteless is offline
Moderator
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,475 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 17 h 7 m 51 sec
Reputation Power: 42
Also, are you aware that storing any important data in a cookie is a massive security hole, since cookies can be simulated by hackers?

Reply With Quote
  #4  
Old April 30th, 2008, 06:26 PM
kiteless kiteless is offline
Moderator
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,475 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 17 h 7 m 51 sec
Reputation Power: 42
Finally, what this is telling you:

Code:
Error Executing Database Query.
Data source not found.
The error occurred in E:\Inetpub\wwwroot\tom\afmlogincheck.cfm: line 31

29 : SELECT 1 FROM afm_users
30 : WHERE user_name = {fn UCASE( '#AfmUName#' )}
31 : AND user_pwd = {fn UCASE( '#AfmPWord#' )}
32 : </cfquery>
33 :

This is my afmlogincheck.cfm
[CODE]
<CFQUERY NAME="test_AfmUName" DATASOURCE = "#Cookie.AFMDSN#" >
SELECT 1 FROM afm_users
WHERE user_name = {fn UCASE( '#AfmUName#' )}
AND user_pwd = {fn UCASE( '#AfmPWord#' )}
</cfquery>


Is that whatever value is defined in Cookie.AFMDSN is not a valid ColdFusion data source name. So you need to set up a data source on the new server if that is the case. And I would strongly recommend not storing the data source name in a cookie.

Reply With Quote
  #5  
Old May 1st, 2008, 02:03 AM
dba_raf dba_raf is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 6 dba_raf User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 54 m 13 sec
Reputation Power: 0
Quote:
Originally Posted by kiteless
Finally, what this is telling you:

Code:
Error Executing Database Query.
Data source not found.
The error occurred in E:\Inetpub\wwwroot\tom\afmlogincheck.cfm: line 31

29 : SELECT 1 FROM afm_users
30 : WHERE user_name = {fn UCASE( '#AfmUName#' )}
31 : AND user_pwd = {fn UCASE( '#AfmPWord#' )}
32 : </cfquery>
33 :

This is my afmlogincheck.cfm
[CODE]
<CFQUERY NAME="test_AfmUName" DATASOURCE = "#Cookie.AFMDSN#" >
SELECT 1 FROM afm_users
WHERE user_name = {fn UCASE( '#AfmUName#' )}
AND user_pwd = {fn UCASE( '#AfmPWord#' )}
</cfquery>


Is that whatever value is defined in Cookie.AFMDSN is not a valid ColdFusion data source name. So you need to set up a data source on the new server if that is the case. And I would strongly recommend not storing the data source name in a cookie.


If I change DATASOURCE = "#Cookie.AFMDSN#" with DATASOURCE = raf in afmlogincheck.cfm run correcly but after I get new error Data source not found.
How can I change DATASOURCE = "#Cookie.AFMDSN#" with a correct variabile?
Thanks in advance!

Reply With Quote
  #6  
Old May 6th, 2008, 04:59 PM
kiteless kiteless is offline
Moderator
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,475 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 17 h 7 m 51 sec
Reputation Power: 42
You're missing the point: you have to set the cookie to a valid data source name or you will always get this error. Use the cfdump tag to look at the values in the cookie and you'll see that you don't have a valid data source name set.

<cfdump var="#cookie#">

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > How connect my project


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

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

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





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