[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1058
  • Last Modified:

Cold Fusion Error

I have a site that I just had to move from a previous host that apparently closed down without warning me.  I am desperately trying to get this website up and running but I keep running into issues.  The site is programmed in Cold Fusion with MsSQL.  I did setup anynomous FTP, at least according to my host i did.  Here is the error:

Error Executing Database Query.

[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
 
The error occurred in D:\hshome\rmellina\mellinaassociates.com\Mellina\admin\dspReSend.cfm: line 6
4 :                   SELECT autUserID, txtFirstName, txtLastName
5 :                   FROM tblUserData
6 :                   WHERE (autUserID = #Form.search#)
7 :             </cfquery>
8 :       <cfelse>
SQL         SELECT autUserID, txtFirstName, txtLastName FROM tblUserData WHERE (autUserID = 533)
DATASOURCE        rmellin_267mell
VENDORERRORCODE        18456
SQLSTATE        28000
Please try the following:
Check the ColdFusion documentation to verify that you are using the correct syntax.
Search the Knowledge Base to find a solution to your problem.
Browser        Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1
Remote Address        173.11.130.234
Referrer        http://www.mellinaassociates.com/Mellina/admin/index.cfm?f=resendReports
Date/Time        16-Apr-09 08:39 PM
Stack Trace
at cfdspReSend2ecfm25584340.runPage(D:\hshome\rmellina\mellinaassociates.com\Mellina\admin\dspReSend.cfm:6) at cfindex2ecfm332684341.runPage(D:\hshome\rmellina\mellinaassociates.com\Mellina\admin\index.cfm:32)


ANy ideas?
0
iFrog
Asked:
iFrog
  • 14
  • 13
1 Solution
 
gdemariaCommented:
You get the same error regardless of what page/query you run?

It seems like you're not connecting to the database.
In the CFIDE/Administrator, have you set up and testing the datasource?   And you are using that datasource name in your cfquery datasource="" paramter?

your datasource in the code is called:   rmellin_267mell

same name needs to be in the admin...
0
 
iFrogAuthor Commented:
thats correct the DSN is rmellin_267mell.  

What do you mean by the same name needs to be in the admin?

The hosting company just told me DSN' take 24 hour to become active.  Would that be correct?
0
 
gdemariaCommented:
in the Coldfusion administrator  CFIDE/Administrator   you need to define  rmellin_267mell  as a datasource and have it point to your database.  


The  DNS is different, DNS is the web domain  www.yoursite.com  finding the new server.


You need to figure out how to create a datasource in your hosting company's administration so that it points to your database.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
iFrogAuthor Commented:
Your talking about the odbc dsn connection string.  Correct?  If so it's been created.
0
 
gdemariaCommented:
Ok, so does your cfquery command have any other parameters besides just the name and datasource?

<cfquery name="myquery" datasource="#application.dsn#">

If there are any passwords or data base types on the line, try removing them.



Also, you want to be sure that the datasource was created correctly.   Perhaps trying a very simply query
with nothing else on the page...

<cfquery name="myquery" datasource="rmellin_267mell">
   select * from [someSmallTable]
</cfquery>



It sounds like you are having trouble connecting to the database...
0
 
gdemariaCommented:
Your SQL server is probably set to using a Windows Integrated Security trusted connection instead of a SQL Security connection.  SQL server connection allows for a username and password to be provided.

That username and password need to then be put in your Coldfusion administrator (where the datasource is setup)


0
 
iFrogAuthor Commented:
ok, I have an application file:

<cfapplication name="Mellina" clientmanagement="yes" sessionmanagement="yes" setclientcookies="yes" setdomaincookies="yes">

<cflock scope="application" timeout="10" type="exclusive">
<!---      <cfset Application.dsn = "rmellin_mellinaassociates"> <!--- MellinaOn ---> --->
      <cfset Application.dsn = "rmellin_267mell"> <!--- MellinaOn --->
      <!---<cfset Application.username = "rmellin_***********">--->
      <cfset Application.username = "rmellin_**********">
      <!---<cfset Application.password = "">--->
      <cfset Application.password = "*******">
      <cfset Application.fileMUser = #Application.username#>
      <cfset Application.fileMPass = "********">
<!---      <cfset Application.fileMPath = "/mellinaassociates_com/www/access/">
      <cfset Application.fileMAdminPath = "/mellina/admin/">
      <cfset Application.fileMFullPath = "C:\sites\coderpro\mellinaassociates\access\">
      <cfset Application.fileMAdminFullPath = "C:\sites\coderpro\mellinaassociates\Mellina\admin\">--->
       
        <cfset Application.fileMPath = "/access/">
      <cfset Application.fileMAdminPath = "/mellina/admin/">
      <cfset Application.fileMFullPath = "/mellina/access/">
      <cfset Application.fileMAdminFullPath = "/Mellina/admin/">
0
 
gdemariaCommented:

You should have a datasource set up in your coldfusion adminstrator that is called

  rmellin_mellinaassociates

with the username : rmellin_**********  (the value of Application.username)
and the password:  ********** ( the value of Application.password )


please show the <cfquery> statement, so we can see if the username/password is being used by cfquery


0
 
iFrogAuthor Commented:
The issue above is starting to work, but know I have another problem that is somewhat similar but the log on user failed is different:

An exception occurred during the execution of the transaction.

 
The root cause of this exception was: java.sql.SQLException: [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'rmellin_mellinassoc'..
 
 
The error occurred in D:\hshome\rmellina\mellinaassociates.com\access\collectUserData.cfm: line 154
Called from D:\hshome\rmellina\mellinaassociates.com\access\collectUserData.cfm: line 66
Called from D:\hshome\rmellina\mellinaassociates.com\access\collectUserData.cfm: line 3
152 :                                 <cfcookie name="mellinaUserData" value="#ArrayToList(Variables.foo, '|')#">
153 :                                  <script>this.window.location="FiroBSplash.cfm";</script>
154 :                          </cfif>
155 :                          </cftransaction>
156 :                  </cfif>
0
 
gdemariaCommented:
looks like the same problem
0
 
iFrogAuthor Commented:
But the Aynomous works and my actual username does not?
0
 
gdemariaCommented:
You're not giving me any information to help you.  You didn't tell me how you resolved the first issue, you haven't shown me the cfquery to see if the username is passed on that line,  you haven't told me how SQL is setup for user authentication or if the datasource is using the same username/password as your application scoped variables...    
0
 
iFrogAuthor Commented:
Sorry, I do not know anything about conldfusion, so I am not sure how to show most of those things.

The 1st issue was solved in when the hosting company finally made the DSN I had setup live.


As for how SQL is setup I am not sure.  I did not set it up.  The original programmer did last year, the manger tool provided by the hosting company never seems to log in.

The DSN is using the same usernames and passwords as the application.

What cfquerry to you want:


The one on the current page giving me trouble is:
<cfset testPage = 0>
<cfinclude template="header.cfm">
		  <cfif #IsDefined('Form.formCheck')#>
		  	<cfset varError = 0>
        	<td width="457" valign="top">
          	<table  border="0" cellpadding="5" cellspacing="3" class="BodyTxtGray">
			<tr>
			<td>
			<cfif NOT (#IsDefined('Form.firstname')# AND #Len(Trim(Form.firstname))#)>
           		<cfoutput>#IncrementValue(Variables.varError)#</cfoutput>. You did not enter your first name.<br>
			 	<cfset varError = #IncrementValue(Variables.varError)#>
			</cfif>
			<cfif NOT (#IsDefined('Form.lastname')# AND #Len(Trim(Form.lastname))#)>
           		<cfoutput>#IncrementValue(Variables.varError)#</cfoutput>. You did not enter your last name.<br>
			 	<cfset varError = #IncrementValue(Variables.varError)#>
			</cfif>
			<cfif NOT (#IsDefined('Form.DOB')# AND #Len(Trim(Form.DOB))#)>
           		<cfoutput>#IncrementValue(Variables.varError)#</cfoutput>. You did not enter your date of birth.<br>
			 	<cfset varError = #IncrementValue(Variables.varError)#>
			<cfelse>
				<cfif NOT #Len(Trim(Form.DOB))# IS 10>
           			<cfoutput>#IncrementValue(Variables.varError)#</cfoutput>. You did not enter a correctly formatted date of birth.<br>
			 		<cfset varError = #IncrementValue(Variables.varError)#>
				<cfelseif NOT #REFindNocase("[[:digit:]]+[[:digit:]]/[[:digit:]]+[[:digit:]]/[[:digit:]]+[[:digit:]][[:digit:]]+[[:digit:]]", Trim(Form.DOB))#>
           			<cfoutput>#IncrementValue(Variables.varError)#</cfoutput>. You did not enter a correctly formatted date of birth.<br>
			 		<cfset varError = #IncrementValue(Variables.varError)#>
				</cfif>
			</cfif>
			<cfif NOT (#IsDefined('Form.sex')# AND #Len(Trim(Form.sex))#)>
           		<cfoutput>#IncrementValue(Variables.varError)#</cfoutput>. You did not specify your sex.<br>
			 	<cfset varError = #IncrementValue(Variables.varError)#>
			</cfif>
			<cfif NOT (#IsDefined('Form.english')# AND #Len(Trim(Form.english))#)>
           		<cfoutput>#IncrementValue(Variables.varError)#</cfoutput>. You did not say if English is your first language.<br>
			 	<cfset varError = #IncrementValue(Variables.varError)#>
			</cfif>
			<cfif (#IsDefined('Form.english')# AND #Form.english# IS 0)>
				<cfif NOT (#IsDefined('Form.FirstLanguage')# AND #Len(Trim(Form.FirstLanguage))#)>
           			<cfoutput>#IncrementValue(Variables.varError)#</cfoutput>. You did not specify what is your first language.<br>
			 		<cfset varError = #IncrementValue(Variables.varError)#>
				</cfif>
			</cfif>
			<cfif NOT (#IsDefined('Form.occupation')# AND #Len(Trim(Form.occupation))#)>
           		<cfoutput>#IncrementValue(Variables.varError)#</cfoutput>. You did not specify your occupation.<br>
			 	<cfset varError = #IncrementValue(Variables.varError)#>
			</cfif>
			<cfif NOT (#IsDefined('Form.currentposition')# AND #Len(Trim(Form.currentposition))#)>
           		<cfoutput>#IncrementValue(Variables.varError)#</cfoutput>. You did not specify your current position.<br>
			 	<cfset varError = #IncrementValue(Variables.varError)#>
			</cfif>
			<cfif NOT (#IsDefined('Form.employedby')# AND #Len(Trim(Form.employedby))#)>
           		<cfoutput>#IncrementValue(Variables.varError)#</cfoutput>. You did not specify who you are employed by.<br>
			 	<cfset varError = #IncrementValue(Variables.varError)#>
			</cfif>
			<cfif NOT (#IsDefined('Form.education')# AND #Len(Trim(Form.education))#)>
           		<cfoutput>#IncrementValue(Variables.varError)#</cfoutput>. You did not specify your education level.<br>
			 	<cfset varError = #IncrementValue(Variables.varError)#>
			</cfif>
			</td>
			</tr>
 
			<cfif #Variables.varError# GTE 1>
           	 <tr>
             	 <td><div align="left"><p>Please <a href="javascript: history.back()">go back</a> and correct the above error/s.</p></div></td>
             </tr>
			<cfelse>
				<cftransaction action="begin">
					<cfset commit = 1>
					
				<cftry>
		  			<cfquery name="check" datasource="#Application.dsn#" username="#Application.username#" password="#Application.password#">
						SELECT txtFirstName, txtMiddleName, txtLastName
						FROM tblUserData
						WHERE (txtFirstName = '#Form.firstname#') AND (txtMiddleName = '#Form.middlename#') AND (txtLastName = '#Form.lastname#') AND (dtmDOB = #Form.dob#)
					</cfquery>
					
					<cfif #check.RecordCount# GT 0><cfset commit = 0></cfif>
					
				<cfcatch type="any">
           			 <tr>
             			 <td><div align="left"><p>There was an error to determine if you are already in the database.</p></div></td>
            		 </tr>
					 <cfset commit = 0>
				</cfcatch>
				</cftry>
					
				<cftry>
					<cfset dobDay = #Mid(Form.DOB, 4, 2)#>
					<cfset dobMonth = #Mid(Form.DOB, 1, 2)#>
					<cfset dobYear = #Mid(Form.DOB, 7, 4)#>
					<cfset newDOB = #CreateDate(dobYear, dobMonth, dobDay)#>
					<cfset newDOB = #CreateODBCDate(newDOB)#>
					<cfquery datasource="#Application.dsn#" username="#Application.username#" password="#Application.password#">
						INSERT INTO tblUserData
                      	(txtFirstName, txtMiddleName, txtLastName, dtmDOB, txtSex, intAge, intEnglish, txtFirstLanguage, txtOccupation, txtPosition, txtEmployedBy, 
                      	txtEducation, txtDegreeObtained, txtVocationalTraining, txtHistoryTitle1, txtHistoryCompany1, txtHistoryTenure1, txtHistorySalary1, txtHistoryTitle2, txtHistoryCompany2, 
                     	 txtHistoryTenure2, txtHistorySalary2, txtHistoryTitle3, txtHistoryCompany3, txtHistoryTenure3, txtHistorySalary3, txtHistoryTitle4, txtHistoryCompany4, 
						  txtHistoryTenure4, txtHistorySalary4, txtHistoryTitle5, txtHistoryCompany5, txtHistoryTenure5, txtHistorySalary5, txtHistoryTitle6, txtHistoryCompany6, 
                      	txtHistoryTenure6, txtHistorySalary6, txtHistoryTitle7, txtHistoryCompany7, txtHistoryTenure7, txtHistorySalary7, txtHistoryTitle8, txtHistoryCompany8, 
                      	txtHistoryTenure8, txtHistorySalary8, intCompanyID)
						VALUES ('#Form.firstname#',<cfif #Form.middlename# IS "">'-'<cfelse>'#Form.middlename#'</cfif>,'#Form.lastname#',#newDOB#,'#Form.sex#', #DateDiff("yyyy", newDOB, Now())#, #Form.english#,'#Form.firstlanguage#','#Form.occupation#','#Form.currentposition#',
							'#Form.employedby#','#Form.education#','#Form.DegreeObtained#','#Form.voctraining#','#Form.WHTitle1#','#Form.WHCompany1#','#Form.WHTenure1#','#Form.WHSalary1#','#Form.WHTitle2#','#Form.WHCompany2#','#Form.WHTenure2#','#Form.WHSalary2#','#Form.WHTitle3#','#Form.WHCompany3#',
							'#Form.WHTenure3#','#Form.WHSalary3#','#Form.WHTitle4#','#Form.WHCompany4#','#Form.WHTenure4#','#Form.WHSalary4#','#Form.WHTitle5#','#Form.WHCompany5#','#Form.WHTenure5#','#Form.WHSalary5#','#Form.WHTitle6#','#Form.WHCompany6#','#Form.WHTenure6#',
							'#Form.WHSalary6#','#Form.WHTitle7#','#Form.WHCompany7#','#Form.WHTenure7#','#Form.WHSalary7#','#Form.WHTitle8#','#Form.WHCompany8#','#Form.WHTenure8#','#Form.WHSalary8#',#Form.companyID#)
					</cfquery>
				<cfcatch type="any">
           			 <tr>
             			 <td><div align="left"><p>There was an error inserting your information into the database.</p></div></td>
            		 </tr>
					 <cfset commit = 0>
				</cfcatch>
				</cftry>
				
				<cftry>
					<cfquery name="identity" datasource="#Application.dsn#" username="#Application.username#" password="#Application.password#">
						SELECT Max(autUserID) AS Newest
						FROM tblUserData
					</cfquery>
				<cfcatch type="any">
           			 <tr>
             			 <td><div align="left"><p>There was an error determing your user ID.</p></div></td>
            		 </tr>
					 <cfset commit = 0>
				</cfcatch>
				</cftry>
 
				<cfif #check.RecordCount# GT 0>
           			 <tr>
             			 <td><div align="left"><p>There is already a user in the database with the same name (<cfoutput>#Form.firstname# #Form.middlename# #Form.lastname#</cfoutput>)</p></div></td>
            		 </tr>
					<cfset commit = 0>
				</cfif>
				
				<cfif #Variables.commit# IS 0>
					<cftransaction action="rollback">
				<cfelse>
					<cftransaction action="commit">
					
					<cfset foo = #arrayNew(1)#>
					<cfset foo[1] = #identity.Newest#> <!--- UserID --->
					<cfset foo[2] = "#Form.firstname#"> <!--- First name --->
					<cfset foo[3] = "#Form.lastname#"> <!--- Last name --->
					<cfset foo[4] = #ListGetAt(Cookie.mellinaUserData, 4, '|')#> <!--- CompanyID --->
					<cfset foo[5] = 0> <!--- Test 1 --->
					<cfset foo[6] = 0> <!--- Test 2 --->
					<cfset foo[7] = 0> <!--- Test 3 --->
					<cfset foo[8] = 0> <!--- Test 4 --->
					<cfset foo[9] = 0> <!--- Test 5 --->
					<cfset foo[10] = 0> <!--- Test 6 --->
					<cfset foo[11] = 0> <!--- Test 7 --->
					<cfset foo[12] = 0> <!--- Test 8 --->
					<cfcookie name="mellinaUserData" value="#ArrayToList(Variables.foo, '|')#">
					<script>this.window.location="FiroBSplash.cfm";</script>
				</cfif>
				</cftransaction>
			</cfif>
			</table>
			</td>
		  <cfelse>
        <td width="457" valign="top"><form name="form" method="post" action="collectUserData.cfm">
          <table  border="0" cellpadding="5" cellspacing="0" class="BodyTxtGray">
		  	<tr>
				<td colspan="2"><b>* Denotes a required field.</b></td>
			</tr>
            <tr>
              <td width="169"><div align="left">First Name: *</div></td>
              <td width="267"><input name="firstname" type="text" id="firstname" size="20" maxlength="50"></td>
              </tr>
            <tr>
              <td><div align="left">Middle
                  Name: </div></td>
              <td><input name="middlename" type="text" id="middlename2" size="20" maxlength="50"></td>
            </tr>
            <tr>
              <td><div align="left">Last Name: *</div></td>
              <td><input name="lastname" type="text" id="lastname" size="20" maxlength="50"></td>
            </tr>
            <tr>
              <td><div align="left">Date of Birth: *<br><small>(05/08/1964)</small></div></td>
              <td><input name="DOB" type="text" id="DOB" size="10" maxlength="10"></td>
              </tr>
            <tr>
              <td><div align="left">Sex: *</div></td>
              <td><select name="Sex" size="1" id="select">
                <option value="" selected>Select One</option>
                <option value="m">Male</option>
                <option value="f">Female</option>
              </select></td>
            </tr>
            <tr>
              <td><div align="left">Is English your first language? *</div></td>
              <td>Yes
                <input name="English" type="radio" value="1" checked>
                &nbsp;No 
                <input name="English" type="radio" value="0"></td>
              </tr>
            <tr>
              <td><div align="left">If not, what is your first language? </div></td>
              <td><input name="FirstLanguage" type="text" id="FirstLanguage" size="25" maxlength="50"></td>
              </tr>
            <tr>
              <td><div align="left">Occupation: *</div></td>
              <td><input name="Occupation" type="text" id="Occupation" size="25" maxlength="50"></td>
            </tr>
            <tr>
              <td><div align="left">Current Position: *</div></td>
              <td><input name="CurrentPosition" type="text" id="CurrentPosition" size="25" maxlength="50"></td>
              </tr>
            <tr>
              <td><div align="left">Employed By: *</div></td>
              <td><input name="EmployedBy" type="text" id="EmployedBy" size="25" maxlength="50"></td>
              </tr>
            <tr>
              <td><div align="left">Education: *<br><small>(Select Highest Level)</small></div></td>
              <td><select name="Education" size="1" id="Education">
                <option value="None" selected>None</option>
                <option value="H.S. Diploma">High School Diploma</option>
                <option value="Some College">Some College</option>
                <option value="Assoc. Degree">Associates Degree</option>
                <option value="College Degree">College Degree</option>
                <option value="Post College Grad">Post College Graduate</option>
              </select></td>
              </tr>
            <tr>
              <td><div align="left">Degree Obtained:<br><small>ex. Bachelor of Business Administration</small></div></td>
              <td><input name="DegreeObtained" type="text" id="DegreeObtained" size="25" maxlength="50"></td>
            </tr>
            <tr>
              <td><div align="left">Vocational
                  Training: </div></td>
              <td><input name="VocTraining" type="text" id="VocTraining" size="25" maxlength="50"></td>
              </tr>
            <tr>
              <td><div align="left"></div></td>
              <td>&nbsp;</td>
              </tr>
            <tr>
              <td valign="bottom"><div align="center">Work History:<br>
                    Title 
                </div></td>
              <td><table width="265"  border="0" cellspacing="0" cellpadding="0">
                <tr valign="bottom">
                  <td width="138">Company</td>
                  <td width="53"><div align="center">Tenure (Yrs) </div></td>
                  <td width="74"><div align="center">Salary<br> 
                      (Per Yr)</div></td>
                </tr>
              </table></td>
              </tr>
            <tr>
              <td><div align="right">1.
                <input name="WHTitle1" type="text" id="WHTitle1" size="15" maxlength="50">
              </div></td>
              <td><input name="WHCompany1" type="text" id="WHCompany1" size="18" maxlength="50">
                <input name="WHTenure1" type="text" id="WHTenure1" size="5" maxlength="50">
                <input name="WHsalary1" type="text" id="WHsalary1" size="8" maxlength="50"></td>
              </tr>
            <tr>
              <td><div align="right">2.
                <input name="WHTitle2" type="text" id="WHTitle22" size="15" maxlength="50">
              </div></td>
              <td>                <input name="WHCompany2" type="text" id="WHCompany2" size="18" maxlength="50">
                <input name="WHTenure2" type="text" id="WHTenure2" size="5" maxlength="50">
                <input name="WHsalary2" type="text" id="WHsalary2" size="8" maxlength="50"></td>
              </tr>
            <tr>
              <td><div align="right">3.
                <input name="WHTitle3" type="text" id="WHTitle3" size="15" maxlength="50">
              </div></td>
              <td>                <input name="WHCompany3" type="text" id="WHCompany3" size="18" maxlength="50">
                <input name="WHTenure3" type="text" id="WHTenure3" size="5" maxlength="50">
                <input name="WHsalary3" type="text" id="WHsalary3" size="8" maxlength="50"></td>
              </tr>
            <tr>
              <td><div align="right">4.
                <input name="WHTitle4" type="text" id="WHTitle4" size="15" maxlength="50">
              </div></td>
              <td>                <input name="WHCompany4" type="text" id="WHCompany4" size="18" maxlength="50">
                <input name="WHTenure4" type="text" id="WHTenure4" size="5" maxlength="50">
                <input name="WHsalary4" type="text" id="WHsalary4" size="8" maxlength="50"></td>
              </tr>
            <tr>
              <td><div align="right">5.
                <input name="WHTitle5" type="text" id="WHTitle5" size="15" maxlength="50">
              </div></td>
              <td>                <input name="WHCompany5" type="text" id="WHCompany5" size="18" maxlength="50">
                <input name="WHTenure5" type="text" id="WHTenure5" size="5" maxlength="50">
                <input name="WHsalary5" type="text" id="WHsalary5" size="8" maxlength="50"></td>
              </tr>
            <tr>
              <td><div align="right">6.
                <input name="WHTitle6" type="text" id="WHTitle6" size="15" maxlength="50">
              </div></td>
              <td>                <input name="WHCompany6" type="text" id="WHCompany6" size="18" maxlength="50">
                <input name="WHTenure6" type="text" id="WHTenure6" size="5" maxlength="50">
                <input name="WHsalary6" type="text" id="WHsalary6" size="8" maxlength="50"></td>
              </tr>
            <tr>
              <td><div align="right">7.
                <input name="WHTitle7" type="text" id="WHTitle7" size="15" maxlength="50">
              </div></td>
              <td>                <input name="WHCompany7" type="text" id="WHCompany7" size="18" maxlength="50">
                <input name="WHTenure7" type="text" id="WHTenure7" size="5" maxlength="50">
                <input name="WHsalary7" type="text" id="WHsalary7" size="8" maxlength="50"></td>
              </tr>
            <tr>
              <td><div align="right">8.
                <input name="WHTitle8" type="text" id="WHTitle8" size="15" maxlength="50">
              </div></td>
              <td>                <input name="WHCompany8" type="text" id="WHCompany8" size="18" maxlength="50">
                <input name="WHTenure8" type="text" id="WHTenure8" size="5" maxlength="50">
                <input name="WHsalary8" type="text" id="WHsalary8" size="8" maxlength="50"></td>
              </tr>
            <tr>
              <td><div align="right"><input name="sumbit" type="image" onClick="document.form.submit()" src="images/submit.gif" alt="Submit" width="56" height="24"></div></td>
              <td>I certify all information is correct to the best of my knowledge. </td>
              </tr>
          </table>
		  <input type="hidden" name="companyID" value="<cfoutput>#ListGetAt(Cookie.mellinaUserData, 4, '|')#</cfoutput>">
		  <input type="hidden" name="formCheck">
        </form>
		</td></cfif>
<cfinclude template="footer.cfm">

Open in new window

0
 
gdemariaCommented:

Ok !  That helps!  

See this line

<cfquery name="check" datasource="#Application.dsn#" username="#Application.username#" password="#Application.password#">


The username and password are being passed on it...  typically that is not done anymore, the username and password are part of the datasource setup in the coldfusion administrator.   So you can try removing them; so it would be like this...


<cfquery name="check" datasource="#Application.dsn#">


This way, if your datasource in your CF administrator works, so should the query... you're not doing anything "extra" on the query statement...  make sense?


0
 
iFrogAuthor Commented:
Ok, that seemed to have worked and lead me to yet another error.  I am beginning to hate this website.
My new error has to do with the same page I gave the code to above.
Element RECORDCOUNT is undefined in CHECK.
 
 
The error occurred in D:\hshome\rmellina\mellinaassociates.com\access\collectUserData.cfm: line 127
Called from D:\hshome\rmellina\mellinaassociates.com\access\collectUserData.cfm: line 67
Called from D:\hshome\rmellina\mellinaassociates.com\access\collectUserData.cfm: line 66
Called from D:\hshome\rmellina\mellinaassociates.com\access\collectUserData.cfm: line 3
125 : 				</cftry>
126 : 
127 : 				<cfif #check.RecordCount# GT 0>
128 :            			 <tr>
129 :              			 <td><div align="left"><p>There is already a user in the database with the same name (<cfoutput>#Form.firstname# #Form.middlename# #Form.lastname#</cfoutput>)</p></div></td>
Please try the following:
Check the ColdFusion documentation to verify that you are using the correct syntax.
Search the Knowledge Base to find a solution to your problem.
Browser  	Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1
Remote Address  	173.11.130.234
Referrer  	http://www.mellinaassociates.com/access/collectUserData.cfm
Date/Time  	17-Apr-09 11:22 AM
Stack Trace
at cfcollectUserData2ecfm941813856._factor4(D:\hshome\rmellina\mellinaassociates.com\access\collectUserData.cfm:127) at cfcollectUserData2ecfm941813856._factor5(D:\hshome\rmellina\mellinaassociates.com\access\collectUserData.cfm:67) at cfcollectUserData2ecfm941813856._factor8(D:\hshome\rmellina\mellinaassociates.com\access\collectUserData.cfm:66) at cfcollectUserData2ecfm941813856.runPage(D:\hshome\rmellina\mellinaassociates.com\access\collectUserData.cfm:3) 
 
coldfusion.runtime.UndefinedElementException: Element RECORDCOUNT is undefined in CHECK.
	at coldfusion.runtime.CfJspPage.resolveCanonicalName(CfJspPage.java:1054)
	at coldfusion.runtime.CfJspPage._resolve(CfJspPage.java:1009)
	at coldfusion.runtime.CfJspPage._resolveAndAutoscalarize(CfJspPage.java:1116)
	at cfcollectUserData2ecfm941813856._factor4(D:\hshome\rmellina\mellinaassociates.com\access\collectUserData.cfm:127)
	at cfcollectUserData2ecfm941813856._factor5(D:\hshome\rmellina\mellinaassociates.com\access\collectUserData.cfm:67)
	at cfcollectUserData2ecfm941813856._factor8(D:\hshome\rmellina\mellinaassociates.com\access\collectUserData.cfm:66)
	at cfcollectUserData2ecfm941813856.runPage(D:\hshome\rmellina\mellinaassociates.com\access\collectUserData.cfm:3)
	at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:152)
	at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:343)
	at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
	at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:210)
	at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:51)
	at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
	at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:50)
	at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
	at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
	at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
	at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
	at coldfusion.CfmServlet.service(CfmServlet.java:105)
	at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:78)
	at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
	at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
	at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:257)
	at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)
	at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:204)
	at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:349)
	at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:457)
	at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:295)
	at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

Open in new window

0
 
gdemariaCommented:
seems lie this line failed..

<cfquery name="check" datasource="#Application.dsn#" username="#Application.username#" password="#Application.password#">


 it was caught by the cftry / cfcatch tags that surround it.  Unfortunately those tags do really nothing at all, they allow the code to keep going.. and since future code relies on the success of the query, it is bombing on line 127


 To resolve, it seems the same steps, strip out the user/pass from the cfquery tag or perhaps go to your application.cfm file and set the application.username and application.password to empty  ""


0
 
iFrogAuthor Commented:
I had removed all the usernames and password calls from the file before, like you had said.  It worked but it just led me to a new error.  I am not sure why there is a recordset call on line 127 when the call was made on line 70 though.  Its still causing the same error.
<cfset testPage = 0>
<cfinclude template="header.cfm">
		  <cfif #IsDefined('Form.formCheck')#>
		  	<cfset varError = 0>
        	<td width="457" valign="top">
          	<table  border="0" cellpadding="5" cellspacing="3" class="BodyTxtGray">
			<tr>
			<td>
			<cfif NOT (#IsDefined('Form.firstname')# AND #Len(Trim(Form.firstname))#)>
           		<cfoutput>#IncrementValue(Variables.varError)#</cfoutput>. You did not enter your first name.<br>
			 	<cfset varError = #IncrementValue(Variables.varError)#>
			</cfif>
			<cfif NOT (#IsDefined('Form.lastname')# AND #Len(Trim(Form.lastname))#)>
           		<cfoutput>#IncrementValue(Variables.varError)#</cfoutput>. You did not enter your last name.<br>
			 	<cfset varError = #IncrementValue(Variables.varError)#>
			</cfif>
			<cfif NOT (#IsDefined('Form.DOB')# AND #Len(Trim(Form.DOB))#)>
           		<cfoutput>#IncrementValue(Variables.varError)#</cfoutput>. You did not enter your date of birth.<br>
			 	<cfset varError = #IncrementValue(Variables.varError)#>
			<cfelse>
				<cfif NOT #Len(Trim(Form.DOB))# IS 10>
           			<cfoutput>#IncrementValue(Variables.varError)#</cfoutput>. You did not enter a correctly formatted date of birth.<br>
			 		<cfset varError = #IncrementValue(Variables.varError)#>
				<cfelseif NOT #REFindNocase("[[:digit:]]+[[:digit:]]/[[:digit:]]+[[:digit:]]/[[:digit:]]+[[:digit:]][[:digit:]]+[[:digit:]]", Trim(Form.DOB))#>
           			<cfoutput>#IncrementValue(Variables.varError)#</cfoutput>. You did not enter a correctly formatted date of birth.<br>
			 		<cfset varError = #IncrementValue(Variables.varError)#>
				</cfif>
			</cfif>
			<cfif NOT (#IsDefined('Form.sex')# AND #Len(Trim(Form.sex))#)>
           		<cfoutput>#IncrementValue(Variables.varError)#</cfoutput>. You did not specify your sex.<br>
			 	<cfset varError = #IncrementValue(Variables.varError)#>
			</cfif>
			<cfif NOT (#IsDefined('Form.english')# AND #Len(Trim(Form.english))#)>
           		<cfoutput>#IncrementValue(Variables.varError)#</cfoutput>. You did not say if English is your first language.<br>
			 	<cfset varError = #IncrementValue(Variables.varError)#>
			</cfif>
			<cfif (#IsDefined('Form.english')# AND #Form.english# IS 0)>
				<cfif NOT (#IsDefined('Form.FirstLanguage')# AND #Len(Trim(Form.FirstLanguage))#)>
           			<cfoutput>#IncrementValue(Variables.varError)#</cfoutput>. You did not specify what is your first language.<br>
			 		<cfset varError = #IncrementValue(Variables.varError)#>
				</cfif>
			</cfif>
			<cfif NOT (#IsDefined('Form.occupation')# AND #Len(Trim(Form.occupation))#)>
           		<cfoutput>#IncrementValue(Variables.varError)#</cfoutput>. You did not specify your occupation.<br>
			 	<cfset varError = #IncrementValue(Variables.varError)#>
			</cfif>
			<cfif NOT (#IsDefined('Form.currentposition')# AND #Len(Trim(Form.currentposition))#)>
           		<cfoutput>#IncrementValue(Variables.varError)#</cfoutput>. You did not specify your current position.<br>
			 	<cfset varError = #IncrementValue(Variables.varError)#>
			</cfif>
			<cfif NOT (#IsDefined('Form.employedby')# AND #Len(Trim(Form.employedby))#)>
           		<cfoutput>#IncrementValue(Variables.varError)#</cfoutput>. You did not specify who you are employed by.<br>
			 	<cfset varError = #IncrementValue(Variables.varError)#>
			</cfif>
			<cfif NOT (#IsDefined('Form.education')# AND #Len(Trim(Form.education))#)>
           		<cfoutput>#IncrementValue(Variables.varError)#</cfoutput>. You did not specify your education level.<br>
			 	<cfset varError = #IncrementValue(Variables.varError)#>
			</cfif>
			</td>
			</tr>
 
			<cfif #Variables.varError# GTE 1>
           	 <tr>
             	 <td><div align="left"><p>Please <a href="javascript: history.back()">go back</a> and correct the above error/s.</p></div></td>
             </tr>
			<cfelse>
				<cftransaction action="begin">
					<cfset commit = 1>
					
				<cftry>
		  			<cfquery name="check" datasource="#Application.dsn#">
						SELECT txtFirstName, txtMiddleName, txtLastName
						FROM tblUserData
						WHERE (txtFirstName = '#Form.firstname#') AND (txtMiddleName = '#Form.middlename#') AND (txtLastName = '#Form.lastname#') AND (dtmDOB = #Form.dob#)
					</cfquery>
					
					<cfif #check.RecordCount# GT 0><cfset commit = 0></cfif>
					
				<cfcatch type="any">
           			 <tr>
             			 <td><div align="left"><p>There was an error to determine if you are already in the database.</p></div></td>
            		 </tr>
					 <cfset commit = 0>
				</cfcatch>
				</cftry>
					
				<cftry>
					<cfset dobDay = #Mid(Form.DOB, 4, 2)#>
					<cfset dobMonth = #Mid(Form.DOB, 1, 2)#>
					<cfset dobYear = #Mid(Form.DOB, 7, 4)#>
					<cfset newDOB = #CreateDate(dobYear, dobMonth, dobDay)#>
					<cfset newDOB = #CreateODBCDate(newDOB)#>
					<cfquery datasource="#Application.dsn#">
						INSERT INTO tblUserData
                      	(txtFirstName, txtMiddleName, txtLastName, dtmDOB, txtSex, intAge, intEnglish, txtFirstLanguage, txtOccupation, txtPosition, txtEmployedBy, 
                      	txtEducation, txtDegreeObtained, txtVocationalTraining, txtHistoryTitle1, txtHistoryCompany1, txtHistoryTenure1, txtHistorySalary1, txtHistoryTitle2, txtHistoryCompany2, 
                     	 txtHistoryTenure2, txtHistorySalary2, txtHistoryTitle3, txtHistoryCompany3, txtHistoryTenure3, txtHistorySalary3, txtHistoryTitle4, txtHistoryCompany4, 
						  txtHistoryTenure4, txtHistorySalary4, txtHistoryTitle5, txtHistoryCompany5, txtHistoryTenure5, txtHistorySalary5, txtHistoryTitle6, txtHistoryCompany6, 
                      	txtHistoryTenure6, txtHistorySalary6, txtHistoryTitle7, txtHistoryCompany7, txtHistoryTenure7, txtHistorySalary7, txtHistoryTitle8, txtHistoryCompany8, 
                      	txtHistoryTenure8, txtHistorySalary8, intCompanyID)
						VALUES ('#Form.firstname#',<cfif #Form.middlename# IS "">'-'<cfelse>'#Form.middlename#'</cfif>,'#Form.lastname#',#newDOB#,'#Form.sex#', #DateDiff("yyyy", newDOB, Now())#, #Form.english#,'#Form.firstlanguage#','#Form.occupation#','#Form.currentposition#',
							'#Form.employedby#','#Form.education#','#Form.DegreeObtained#','#Form.voctraining#','#Form.WHTitle1#','#Form.WHCompany1#','#Form.WHTenure1#','#Form.WHSalary1#','#Form.WHTitle2#','#Form.WHCompany2#','#Form.WHTenure2#','#Form.WHSalary2#','#Form.WHTitle3#','#Form.WHCompany3#',
							'#Form.WHTenure3#','#Form.WHSalary3#','#Form.WHTitle4#','#Form.WHCompany4#','#Form.WHTenure4#','#Form.WHSalary4#','#Form.WHTitle5#','#Form.WHCompany5#','#Form.WHTenure5#','#Form.WHSalary5#','#Form.WHTitle6#','#Form.WHCompany6#','#Form.WHTenure6#',
							'#Form.WHSalary6#','#Form.WHTitle7#','#Form.WHCompany7#','#Form.WHTenure7#','#Form.WHSalary7#','#Form.WHTitle8#','#Form.WHCompany8#','#Form.WHTenure8#','#Form.WHSalary8#',#Form.companyID#)
					</cfquery>
				<cfcatch type="any">
           			 <tr>
             			 <td><div align="left"><p>There was an error inserting your information into the database.</p></div></td>
            		 </tr>
					 <cfset commit = 0>
				</cfcatch>
				</cftry>
				
				<cftry>
					<cfquery name="identity" datasource="#Application.dsn#">
						SELECT Max(autUserID) AS Newest
						FROM tblUserData
					</cfquery>
				<cfcatch type="any">
           			 <tr>
             			 <td><div align="left"><p>There was an error determing your user ID.</p></div></td>
            		 </tr>
					 <cfset commit = 0>
				</cfcatch>
				</cftry>
 
				<cfif #check.RecordCount# GT 0>
           			 <tr>
             			 <td><div align="left"><p>There is already a user in the database with the same name (<cfoutput>#Form.firstname# #Form.middlename# #Form.lastname#</cfoutput>)</p></div></td>
            		 </tr>
					<cfset commit = 0>
				</cfif>
				
				<cfif #Variables.commit# IS 0>
					<cftransaction action="rollback">
				<cfelse>
					<cftransaction action="commit">
					
					<cfset foo = #arrayNew(1)#>
					<cfset foo[1] = #identity.Newest#> <!--- UserID --->
					<cfset foo[2] = "#Form.firstname#"> <!--- First name --->
					<cfset foo[3] = "#Form.lastname#"> <!--- Last name --->
					<cfset foo[4] = #ListGetAt(Cookie.mellinaUserData, 4, '|')#> <!--- CompanyID --->
					<cfset foo[5] = 0> <!--- Test 1 --->
					<cfset foo[6] = 0> <!--- Test 2 --->
					<cfset foo[7] = 0> <!--- Test 3 --->
					<cfset foo[8] = 0> <!--- Test 4 --->
					<cfset foo[9] = 0> <!--- Test 5 --->
					<cfset foo[10] = 0> <!--- Test 6 --->
					<cfset foo[11] = 0> <!--- Test 7 --->
					<cfset foo[12] = 0> <!--- Test 8 --->
					<cfcookie name="mellinaUserData" value="#ArrayToList(Variables.foo, '|')#">
					<script>this.window.location="FiroBSplash.cfm";</script>
				</cfif>
				</cftransaction>
			</cfif>
			</table>
			</td>
		  <cfelse>
        <td width="457" valign="top"><form name="form" method="post" action="collectUserData.cfm">
          <table  border="0" cellpadding="5" cellspacing="0" class="BodyTxtGray">
		  	<tr>
				<td colspan="2"><b>* Denotes a required field.</b></td>
			</tr>
            <tr>
              <td width="169"><div align="left">First Name: *</div></td>
              <td width="267"><input name="firstname" type="text" id="firstname" size="20" maxlength="50"></td>
              </tr>
            <tr>
              <td><div align="left">Middle
                  Name: </div></td>
              <td><input name="middlename" type="text" id="middlename2" size="20" maxlength="50"></td>
            </tr>
            <tr>
              <td><div align="left">Last Name: *</div></td>
              <td><input name="lastname" type="text" id="lastname" size="20" maxlength="50"></td>
            </tr>
            <tr>
              <td><div align="left">Date of Birth: *<br><small>(05/08/1964)</small></div></td>
              <td><input name="DOB" type="text" id="DOB" size="10" maxlength="10"></td>
              </tr>
            <tr>
              <td><div align="left">Sex: *</div></td>
              <td><select name="Sex" size="1" id="select">
                <option value="" selected>Select One</option>
                <option value="m">Male</option>
                <option value="f">Female</option>
              </select></td>
            </tr>
            <tr>
              <td><div align="left">Is English your first language? *</div></td>
              <td>Yes
                <input name="English" type="radio" value="1" checked>
                &nbsp;No 
                <input name="English" type="radio" value="0"></td>
              </tr>
            <tr>
              <td><div align="left">If not, what is your first language? </div></td>
              <td><input name="FirstLanguage" type="text" id="FirstLanguage" size="25" maxlength="50"></td>
              </tr>
            <tr>
              <td><div align="left">Occupation: *</div></td>
              <td><input name="Occupation" type="text" id="Occupation" size="25" maxlength="50"></td>
            </tr>
            <tr>
              <td><div align="left">Current Position: *</div></td>
              <td><input name="CurrentPosition" type="text" id="CurrentPosition" size="25" maxlength="50"></td>
              </tr>
            <tr>
              <td><div align="left">Employed By: *</div></td>
              <td><input name="EmployedBy" type="text" id="EmployedBy" size="25" maxlength="50"></td>
              </tr>
            <tr>
              <td><div align="left">Education: *<br><small>(Select Highest Level)</small></div></td>
              <td><select name="Education" size="1" id="Education">
                <option value="None" selected>None</option>
                <option value="H.S. Diploma">High School Diploma</option>
                <option value="Some College">Some College</option>
                <option value="Assoc. Degree">Associates Degree</option>
                <option value="College Degree">College Degree</option>
                <option value="Post College Grad">Post College Graduate</option>
              </select></td>
              </tr>
            <tr>
              <td><div align="left">Degree Obtained:<br><small>ex. Bachelor of Business Administration</small></div></td>
              <td><input name="DegreeObtained" type="text" id="DegreeObtained" size="25" maxlength="50"></td>
            </tr>
            <tr>
              <td><div align="left">Vocational
                  Training: </div></td>
              <td><input name="VocTraining" type="text" id="VocTraining" size="25" maxlength="50"></td>
              </tr>
            <tr>
              <td><div align="left"></div></td>
              <td>&nbsp;</td>
              </tr>
            <tr>
              <td valign="bottom"><div align="center">Work History:<br>
                    Title 
                </div></td>
              <td><table width="265"  border="0" cellspacing="0" cellpadding="0">
                <tr valign="bottom">
                  <td width="138">Company</td>
                  <td width="53"><div align="center">Tenure (Yrs) </div></td>
                  <td width="74"><div align="center">Salary<br> 
                      (Per Yr)</div></td>
                </tr>
              </table></td>
              </tr>
            <tr>
              <td><div align="right">1.
                <input name="WHTitle1" type="text" id="WHTitle1" size="15" maxlength="50">
              </div></td>
              <td><input name="WHCompany1" type="text" id="WHCompany1" size="18" maxlength="50">
                <input name="WHTenure1" type="text" id="WHTenure1" size="5" maxlength="50">
                <input name="WHsalary1" type="text" id="WHsalary1" size="8" maxlength="50"></td>
              </tr>
            <tr>
              <td><div align="right">2.
                <input name="WHTitle2" type="text" id="WHTitle22" size="15" maxlength="50">
              </div></td>
              <td>                <input name="WHCompany2" type="text" id="WHCompany2" size="18" maxlength="50">
                <input name="WHTenure2" type="text" id="WHTenure2" size="5" maxlength="50">
                <input name="WHsalary2" type="text" id="WHsalary2" size="8" maxlength="50"></td>
              </tr>
            <tr>
              <td><div align="right">3.
                <input name="WHTitle3" type="text" id="WHTitle3" size="15" maxlength="50">
              </div></td>
              <td>                <input name="WHCompany3" type="text" id="WHCompany3" size="18" maxlength="50">
                <input name="WHTenure3" type="text" id="WHTenure3" size="5" maxlength="50">
                <input name="WHsalary3" type="text" id="WHsalary3" size="8" maxlength="50"></td>
              </tr>
            <tr>
              <td><div align="right">4.
                <input name="WHTitle4" type="text" id="WHTitle4" size="15" maxlength="50">
              </div></td>
              <td>                <input name="WHCompany4" type="text" id="WHCompany4" size="18" maxlength="50">
                <input name="WHTenure4" type="text" id="WHTenure4" size="5" maxlength="50">
                <input name="WHsalary4" type="text" id="WHsalary4" size="8" maxlength="50"></td>
              </tr>
            <tr>
              <td><div align="right">5.
                <input name="WHTitle5" type="text" id="WHTitle5" size="15" maxlength="50">
              </div></td>
              <td>                <input name="WHCompany5" type="text" id="WHCompany5" size="18" maxlength="50">
                <input name="WHTenure5" type="text" id="WHTenure5" size="5" maxlength="50">
                <input name="WHsalary5" type="text" id="WHsalary5" size="8" maxlength="50"></td>
              </tr>
            <tr>
              <td><div align="right">6.
                <input name="WHTitle6" type="text" id="WHTitle6" size="15" maxlength="50">
              </div></td>
              <td>                <input name="WHCompany6" type="text" id="WHCompany6" size="18" maxlength="50">
                <input name="WHTenure6" type="text" id="WHTenure6" size="5" maxlength="50">
                <input name="WHsalary6" type="text" id="WHsalary6" size="8" maxlength="50"></td>
              </tr>
            <tr>
              <td><div align="right">7.
                <input name="WHTitle7" type="text" id="WHTitle7" size="15" maxlength="50">
              </div></td>
              <td>                <input name="WHCompany7" type="text" id="WHCompany7" size="18" maxlength="50">
                <input name="WHTenure7" type="text" id="WHTenure7" size="5" maxlength="50">
                <input name="WHsalary7" type="text" id="WHsalary7" size="8" maxlength="50"></td>
              </tr>
            <tr>
              <td><div align="right">8.
                <input name="WHTitle8" type="text" id="WHTitle8" size="15" maxlength="50">
              </div></td>
              <td>                <input name="WHCompany8" type="text" id="WHCompany8" size="18" maxlength="50">
                <input name="WHTenure8" type="text" id="WHTenure8" size="5" maxlength="50">
                <input name="WHsalary8" type="text" id="WHsalary8" size="8" maxlength="50"></td>
              </tr>
            <tr>
              <td><div align="right"><input name="sumbit" type="image" onClick="document.form.submit()" src="images/submit.gif" alt="Submit" width="56" height="24"></div></td>
              <td>I certify all information is correct to the best of my knowledge. </td>
              </tr>
          </table>
		  <input type="hidden" name="companyID" value="<cfoutput>#ListGetAt(Cookie.mellinaUserData, 4, '|')#</cfoutput>">
		  <input type="hidden" name="formCheck">
        </form>
		</td></cfif>
<cfinclude template="footer.cfm">

Open in new window

0
 
gdemariaCommented:
Let's take a look at the error that's not displaying can you add the one new line to this block of code..


				<cftry>
		  			<cfquery name="check" datasource="#Application.dsn#">
						SELECT txtFirstName, txtMiddleName, txtLastName
						FROM tblUserData
						WHERE (txtFirstName = '#Form.firstname#') AND (txtMiddleName = '#Form.middlename#') AND (txtLastName = '#Form.lastname#') AND (dtmDOB = #Form.dob#)
					</cfquery>
					
					<cfif #check.RecordCount# GT 0><cfset commit = 0></cfif>
					
				<cfcatch type="any">
           			 <tr>
             			 <td><div align="left"><p>There was an error to determine if you are already in the database.</p></div></td>
            		 </tr>
					 <cfset commit = 0>
					 <cfrethrow>  <!------  ADD THIS LINE HERE ----->
				</cfcatch>
				</cftry>

Open in new window

0
 
iFrogAuthor Commented:
Ok, well I got another error now.  Which is pointing I guess to my DSN string.  

Data source rmellin_267mell verification failed.

The root cause was that: java.sql.SQLException: [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'rmellin_mellinassoc'.
 
The error occurred in D:\hshome\rmellina\mellinaassociates.com\access\collectUserData.cfm: line 71
Called from D:\hshome\rmellina\mellinaassociates.com\access\collectUserData.cfm: line 67
Called from D:\hshome\rmellina\mellinaassociates.com\access\collectUserData.cfm: line 66
Called from D:\hshome\rmellina\mellinaassociates.com\access\collectUserData.cfm: line 3
69 :                               
70 :                         <cftry>
71 :                                 <cfquery name="check" datasource="#Application.dsn#">
72 :                                     SELECT txtFirstName, txtMiddleName, txtLastName
73 :                                     FROM tblUserData
DATASOURCE        rmellin_267mell
VENDORERRORCODE        18456
SQLSTATE        28000
Please try the following:
Check the ColdFusion documentation to verify that you are using the correct syntax.
Search the Knowledge Base to find a solution to your problem.
Browser        Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1
Remote Address        173.11.130.234
Referrer        http://www.mellinaassociates.com/access/collectUserData.cfm
Date/Time        17-Apr-09 01:12 PM
Stack Trace
at cfcollectUserData2ecfm941813856._factor3(D:\hshome\rmellina\mellinaassociates.com\access\collectUserData.cfm:71) at cfcollectUserData2ecfm941813856._factor5(D:\hshome\rmellina\mellinaassociates.com\access\collectUserData.cfm:67) at cfcollectUserData2ecfm941813856._factor8(D:\hshome\rmellina\mellinaassociates.com\access\collectUserData.cfm:66) at cfcollectUserData2ecfm941813856.runPage(D:\hshome\rmellina\mellinaassociates.com\access\collectUserData.cfm:3)

java.sql.SQLException: [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'rmellin_mellinassoc'.
      at macromedia.sequelink.ssp.Diagnostic.toSQLException(Unknown Source)
      at macromedia.sequelink.ssp.Chain.cnvDiagnostics(Unknown Source)
      at macromedia.sequelink.ssp.Chain.decodeDiagnostic(Unknown Source)
      at macromedia.sequelink.ssp.Chain.decodeBody(Unknown Source)
      at macromedia.sequelink.ssp.Chain.decode(Unknown Source)
      at macromedia.sequelink.ssp.Chain.send(Unknown Source)
      at macromedia.sequelink.ctxt.conn.SessionContext.logon(Unknown Source)
      at macromedia.sequelink.ctxt.conn.SessionContext.<init>(Unknown Source)
      at macromedia.sequelink.ctxt.conn.ConnectionContext.connect(Unknown Source)
      at macromedia.jdbc.sequelink.SequeLinkImplConnection.open(Unknown Source)
      at macromedia.jdbc.slbase.BaseConnection.getNewImplConnection(Unknown Source)
      at macromedia.jdbc.slbase.BaseConnection.open(Unknown Source)
      at macromedia.jdbc.slbase.BaseDriver.connect(Unknown Source)
      at macromedia.jdbc.MacromediaDriver.connect(Unknown Source)
      at coldfusion.server.j2ee.sql.pool.JDBCPool.createPhysicalConnection(JDBCPool.java:562)
      at coldfusion.server.j2ee.sql.pool.ConnectionRunner$RunnableConnection.run(ConnectionRunner.java:67)
      at java.lang.Thread.run(Unknown Source)
0
 
gdemariaCommented:
Yup, here we go again :)

The datasource is not able to connect to the database.  If you have another query that you know is running without error, let's look at the differences.  But it seems that your datasource is still not setup correctly.  The datasource is in the coldfusion administrator web page..

Data source rmellin_267mell verification failed.

The root cause was that: java.sql.SQLException: [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'rmellin_mellinassoc'.
0
 
iFrogAuthor Commented:
This page is running fine.  It pulls data and connects to the database with out any issues.  It was the orginal page I had issues with but when my host reset the Cold fusion server for my DSN its been working.
<cfif #IsDefined('Form.search')#>
	<cfif #IsNumeric(Form.search)#>
		<cfquery name="q" datasource="#Application.dsn#" username="#Application.username#" password="#Application.password#">
			SELECT autUserID, txtFirstName, txtLastName
			FROM tblUserData
			WHERE (autUserID = #Form.search#)
		</cfquery>
	<cfelse>
		<cfquery name="q" datasource="#Application.dsn#" username="#Application.username#" password="#Application.password#">
			SELECT autUserID, txtFirstName, txtLastName
			FROM tblUserData
			WHERE DIFFERENCE('#Form.search#', txtLastName) = 4 OR txtLastName LIKE '%#Form.search#%'
		</cfquery>
	</cfif>
	
	<table width="90%" cellpadding="2" cellspacing="2" border="0">
		<cfif #q.RecordCount# GTE 1>
		<tr>
			<td colspan="4">Your search returned <b><cfoutput>#q.RecordCount#</cfoutput></b> result<cfif (#q.RecordCount# GT 1)>s</cfif></td>
		</tr>
		<cfoutput query="q">
		<tr>
			<td width="10">#q.CurrentRow#.</td>
			<td>#q.txtLastName#, #q.txtFirstName#</td>
			<td><a href="index.cfm?f=viewUser&user=#q.autUserID#">View</a></td>
			<td><a href="index.cfm?f=resendReports&user=#q.autUserID#">Generate Email</a></td>
		</tr>
		</cfoutput>
		<cfelse>
		<tr>
			<td colspan="3">Your search returned <b>0</b> results.</td>
		</tr>
		</cfif>
	</table>
<cfelseif #IsDefined('Url.user')#>
	<cfinclude template="generateReportsAdmin.cfm">
	<cflocation url="index.cfm" addtoken="no">
<cfelse>
<p>To re-send the original files for a user type in the user's last name or ID number and click 'Search'.</p>
<form action="index.cfm?f=resendReports" method="post">
<table width="90%" cellpadding="2" cellspacing="2" border="0">
	<tr>
		<td>Last Name OR ID Number:</td>
		<td><input type="text" name="search" size="15"></td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
		<td colspan="2"><input type="submit" value=" Search "></td>
	</tr>
</table>
</form>
</cfif>

Open in new window

0
 
gdemariaCommented:
oh, if the page you just posted is working WITH the username and password parameters, perhaps you need to add them back to the page we were working on...

 username="#Application.username#" password="#Application.password#"
0
 
iFrogAuthor Commented:
OK, so i did that.  Similar error different section of the code:

An exception occurred during the execution of the transaction.

The root cause of this exception was: java.sql.SQLException: [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'rmellin_mellinassoc'..
 
The error occurred in D:\hshome\rmellina\mellinaassociates.com\access\collectUserData.cfm: line 155
Called from D:\hshome\rmellina\mellinaassociates.com\access\collectUserData.cfm: line 66
Called from D:\hshome\rmellina\mellinaassociates.com\access\collectUserData.cfm: line 3
153 :                               <cfcookie name="mellinaUserData" value="#ArrayToList(Variables.foo, '|')#">
154 :                               <script>this.window.location="FiroBSplash.cfm";</script>
155 :                         </cfif>
156 :                         </cftransaction>
157 :                   </cfif>
0
 
gdemariaCommented:
have you added back the username/password everywhere?   Sorry, they really shouldn't be needed


0
 
iFrogAuthor Commented:
Yep, I did that.  Thats what the last error gave me with them all added.  If I take them away in different sections of the code, then I get the same error just in different locations.
0
 
gdemariaCommented:
so are the errors happening to the cfquery tags where the username and password ARE or are NOT included?
Or is there no pattern?

Just to be sure.. you only have one datasource right?    
0
 
iFrogAuthor Commented:
Correct one the datasource.

From what I am seeing, if the username and password are missing then the database connection can not be verified according to the line the username and password are missing from.  If username and password are all missing then the query cannot be verified on line 155.  If username and password is inserted in all the queries, then the dataase can not be verified on line 155.
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

  • 14
  • 13
Tackle projects and never again get stuck behind a technical roadblock.
Join Now