iFrog
asked on
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\mellina associates .com\Melli na\admin\d spReSend.c fm: 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.r unPage(D:\ hshome\rme llina\mell inaassocia tes.com\Me llina\admi n\dspReSen d.cfm:6) at cfindex2ecfm332684341.runP age(D:\hsh ome\rmelli na\mellina associates .com\Melli na\admin\i ndex.cfm:3 2)
ANy ideas?
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\mellina
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.r
ANy ideas?
ASKER
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?
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?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Your talking about the odbc dsn connection string. Correct? If so it's been created.
Ok, so does your cfquery command have any other parameters besides just the name and datasource?
<cfquery name="myquery" datasource="#application.d sn#">
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_267mel l">
select * from [someSmallTable]
</cfquery>
It sounds like you are having trouble connecting to the database...
<cfquery name="myquery" datasource="#application.d
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_267mel
select * from [someSmallTable]
</cfquery>
It sounds like you are having trouble connecting to the database...
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)
That username and password need to then be put in your Coldfusion administrator (where the datasource is setup)
ASKER
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/ww w/access/" >
<cfset Application.fileMAdminPath = "/mellina/admin/">
<cfset Application.fileMFullPath = "C:\sites\coderpro\mellina associates \access\">
<cfset Application.fileMAdminFull Path = "C:\sites\coderpro\mellina associates \Mellina\a dmin\">--- >
<cfset Application.fileMPath = "/access/">
<cfset Application.fileMAdminPath = "/mellina/admin/">
<cfset Application.fileMFullPath = "/mellina/access/">
<cfset Application.fileMAdminFull Path = "/Mellina/admin/">
<cfapplication name="Mellina" clientmanagement="yes" sessionmanagement="yes" setclientcookies="yes" setdomaincookies="yes">
<cflock scope="application" timeout="10" type="exclusive">
<!--- <cfset Application.dsn = "rmellin_mellinaassociates
<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/ww
<cfset Application.fileMAdminPath
<cfset Application.fileMFullPath = "C:\sites\coderpro\mellina
<cfset Application.fileMAdminFull
<cfset Application.fileMPath = "/access/">
<cfset Application.fileMAdminPath
<cfset Application.fileMFullPath = "/mellina/access/">
<cfset Application.fileMAdminFull
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
ASKER
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\mellina associates .com\acces s\collectU serData.cf m: line 154
Called from D:\hshome\rmellina\mellina associates .com\acces s\collectU serData.cf m: line 66
Called from D:\hshome\rmellina\mellina associates .com\acces s\collectU serData.cf m: line 3
152 : <cfcookie name="mellinaUserData" value="#ArrayToList(Variab les.foo, '|')#">
153 : <script>this.window.locati on="FiroBS plash.cfm" ;</script>
154 : </cfif>
155 : </cftransaction>
156 : </cfif>
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\mellina
Called from D:\hshome\rmellina\mellina
Called from D:\hshome\rmellina\mellina
152 : <cfcookie name="mellinaUserData" value="#ArrayToList(Variab
153 : <script>this.window.locati
154 : </cfif>
155 : </cftransaction>
156 : </cfif>
looks like the same problem
ASKER
But the Aynomous works and my actual username does not?
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...
ASKER
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:
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>
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> </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">
Ok ! That helps!
See this line
<cfquery name="check" datasource="#Application.d
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.d
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?
ASKER
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.
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)
seems lie this line failed..
<cfquery name="check" datasource="#Application.d sn#" username="#Application.use rname#" password="#Application.pas sword#">
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 ""
<cfquery name="check" datasource="#Application.d
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 ""
ASKER
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>
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> </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">
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>
ASKER
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\mellina associates .com\acces s\collectU serData.cf m: line 71
Called from D:\hshome\rmellina\mellina associates .com\acces s\collectU serData.cf m: line 67
Called from D:\hshome\rmellina\mellina associates .com\acces s\collectU serData.cf m: line 66
Called from D:\hshome\rmellina\mellina associates .com\acces s\collectU serData.cf m: line 3
69 :
70 : <cftry>
71 : <cfquery name="check" datasource="#Application.d sn#">
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 cfcollectUserData2ecfm9418 13856._fac tor3(D:\hs home\rmell ina\mellin aassociate s.com\acce ss\collect UserData.c fm:71) at cfcollectUserData2ecfm9418 13856._fac tor5(D:\hs home\rmell ina\mellin aassociate s.com\acce ss\collect UserData.c fm:67) at cfcollectUserData2ecfm9418 13856._fac tor8(D:\hs home\rmell ina\mellin aassociate s.com\acce ss\collect UserData.c fm:66) at cfcollectUserData2ecfm9418 13856.runP age(D:\hsh ome\rmelli na\mellina associates .com\acces s\collectU serData.cf m: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.D iagnostic. toSQLExcep tion(Unkno wn Source)
at macromedia.sequelink.ssp.C hain.cnvDi agnostics( Unknown Source)
at macromedia.sequelink.ssp.C hain.decod eDiagnosti c(Unknown Source)
at macromedia.sequelink.ssp.C hain.decod eBody(Unkn own Source)
at macromedia.sequelink.ssp.C hain.decod e(Unknown Source)
at macromedia.sequelink.ssp.C hain.send( Unknown Source)
at macromedia.sequelink.ctxt. conn.Sessi onContext. logon(Unkn own Source)
at macromedia.sequelink.ctxt. conn.Sessi onContext. <init>(Unk nown Source)
at macromedia.sequelink.ctxt. conn.Conne ctionConte xt.connect (Unknown Source)
at macromedia.jdbc.sequelink. SequeLinkI mplConnect ion.open(U nknown Source)
at macromedia.jdbc.slbase.Bas eConnectio n.getNewIm plConnecti on(Unknown Source)
at macromedia.jdbc.slbase.Bas eConnectio n.open(Unk nown Source)
at macromedia.jdbc.slbase.Bas eDriver.co nnect(Unkn own Source)
at macromedia.jdbc.Macromedia Driver.con nect(Unkno wn Source)
at coldfusion.server.j2ee.sql .pool.JDBC Pool.creat ePhysicalC onnection( JDBCPool.j ava:562)
at coldfusion.server.j2ee.sql .pool.Conn ectionRunn er$Runnabl eConnectio n.run(Conn ectionRunn er.java:67 )
at java.lang.Thread.run(Unkno wn Source)
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\mellina
Called from D:\hshome\rmellina\mellina
Called from D:\hshome\rmellina\mellina
Called from D:\hshome\rmellina\mellina
69 :
70 : <cftry>
71 : <cfquery name="check" datasource="#Application.d
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 cfcollectUserData2ecfm9418
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.D
at macromedia.sequelink.ssp.C
at macromedia.sequelink.ssp.C
at macromedia.sequelink.ssp.C
at macromedia.sequelink.ssp.C
at macromedia.sequelink.ssp.C
at macromedia.sequelink.ctxt.
at macromedia.sequelink.ctxt.
at macromedia.sequelink.ctxt.
at macromedia.jdbc.sequelink.
at macromedia.jdbc.slbase.Bas
at macromedia.jdbc.slbase.Bas
at macromedia.jdbc.slbase.Bas
at macromedia.jdbc.Macromedia
at coldfusion.server.j2ee.sql
at coldfusion.server.j2ee.sql
at java.lang.Thread.run(Unkno
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'.
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'.
ASKER
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"> </td>
</tr>
<tr>
<td colspan="2"><input type="submit" value=" Search "></td>
</tr>
</table>
</form>
</cfif>
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.use rname#" password="#Application.pas sword#"
username="#Application.use
ASKER
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\mellina associates .com\acces s\collectU serData.cf m: line 155
Called from D:\hshome\rmellina\mellina associates .com\acces s\collectU serData.cf m: line 66
Called from D:\hshome\rmellina\mellina associates .com\acces s\collectU serData.cf m: line 3
153 : <cfcookie name="mellinaUserData" value="#ArrayToList(Variab les.foo, '|')#">
154 : <script>this.window.locati on="FiroBS plash.cfm" ;</script>
155 : </cfif>
156 : </cftransaction>
157 : </cfif>
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\mellina
Called from D:\hshome\rmellina\mellina
Called from D:\hshome\rmellina\mellina
153 : <cfcookie name="mellinaUserData" value="#ArrayToList(Variab
154 : <script>this.window.locati
155 : </cfif>
156 : </cftransaction>
157 : </cfif>
have you added back the username/password everywhere? Sorry, they really shouldn't be needed
ASKER
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.
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?
Or is there no pattern?
Just to be sure.. you only have one datasource right?
ASKER
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.
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.
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...