<cffunction name="validateUserName" access="public" hint="I look for other users with the same username. True if found, false if not." output="false" returntype="boolean">
<cfargument name="userName" hint="I am the username ot check for." required="yes" type="string" />
<cfset var qValidate = "" />
<cfquery name="qValidate" datasource="#_getConfig().getDsn()#" username="#_getConfig().getUsername()#" password="#_getConfig().getPassword()#">
SELECT username
FROM users
WHERE username = <cfqueryparam cfsqltype="cf_sql_varchar" maxlength="50" value="#arguments.userName#" />
</cfquery>
<cfreturn qValidate.recordcount IS 1 />
</cffunction>
On 8/3/06, Patrick McElhaney <
[EMAIL PROTECTED]> wrote:
I haven't seen it before, but I can make an educated guess.
The error occurred on a cfquery tag, which specifies a dsn but no username or password.
Did you specify a username and password in the config in reactor.xml ? If so Reactor's running a cfquery somewhere else that includes the username and password. It's running its cfquery (with username and password) and your cfquery (without username and password) in the same transaction. Apparently, that's not allowed: "Usernames and Passwords for all the database tags within CFTRANSACTION must be the same."
To fix, you either need to include the username and password in your own cfquery tag or take the username and password out of your reactor.xml. Or build your queries with createQuery() so that Reactor can manage the username and password (or lack thereof) itself.
PatrickOn 8/2/06, Dan Vega <[EMAIL PROTECTED]> wrote:Has anyone seen this error before?
The following information is meant for the website developer for debugging purposes. Error Occurred While Processing Request
Data source ***** verification failed.
The root cause was that: java.sql.SQLException: Usernames and Passwords for all the database tags within CFTRANSACTION must be the same. The error occurred in C:\Program Files\Apache Group\Apache2\htdocs\ ***** \data\Gateway\usersGateway.cfc: line 25
Called from C:\Program Files\Apache Group\Apache2\htdocs\*****\data\Validator\usersValidator.cfc: line 27
Called from C:\Program Files\Apache Group\Apache2\htdocs\ ***** \data\Validator\usersValidator.cfc: line 14
Called from C:\Program Files\Apache Group\Apache2\htdocs\reactor\project\ ***** \Validator\usersValidator.cfc: line 15
Called from C:\Program Files\Apache Group\Apache2\htdocs\Reactor\base\abstractRecord.cfc: line 83
Called from C:\Program Files\Apache Group\Apache2\htdocs\ ***** \staff\editAdvisor.cfm: line 28
Called from C:\Program Files\Apache Group\Apache2\htdocs\ ***** \staff\editAdvisor.cfm: line 15
Called from C:\Program Files\Apache Group\Apache2\htdocs\ ***** \staff\editAdvisor.cfm: line 13
Called from C:\Program Files\Apache Group\Apache2\htdocs\ ***** \staff\editAdvisor.cfm: line 1
Called from C:\Program Files\Apache Group\Apache2\htdocs\ ***** \staff\Application.cfc: line 28
Called from C:\Program Files\Apache Group\Apache2\htdocs\ ***** \data\Gateway\usersGateway.cfc: line 25
Called from C:\Program Files\Apache Group\Apache2\htdocs\ ***** \data\Validator\usersValidator.cfc: line 27
Called from C:\Program Files\Apache Group\Apache2\htdocs\ ***** \data\Validator\usersValidator.cfc: line 14
Called from C:\Program Files\Apache Group\Apache2\htdocs\reactor\project\ ***** \Validator\usersValidator.cfc: line 15
Called from C:\Program Files\Apache Group\Apache2\htdocs\Reactor\base\abstractRecord.cfc: line 83
Called from C:\Program Files\Apache Group\Apache2\htdocs\ ***** \staff\editAdvisor.cfm: line 28
Called from C:\Program Files\Apache Group\Apache2\htdocs\ ***** \staff\editAdvisor.cfm: line 15
Called from C:\Program Files\Apache Group\Apache2\htdocs\ ***** \staff\editAdvisor.cfm: line 13
Called from C:\Program Files\Apache Group\Apache2\htdocs\ ***** \staff\editAdvisor.cfm: line 1
Called from C:\Program Files\Apache Group\Apache2\htdocs\ ***** \staff\Application.cfc: line 28
23 : <cfset var qValidate = "" />
24 :
25 : <cfquery name="qValidate" datasource="#_getConfig().getDsn()#">
26 : SELECT username
27 : FROM users
--
Dan Vega
[EMAIL PROTECTED]
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
--
Patrick McElhaney
704.560.9117
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
--
Dan Vega
[EMAIL PROTECTED]
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
