Yes, StrComp was an answer. Thank you.
I did not realize that coldfusion must just pass the SELECT
statement to MS Access with examining it therefore didn't think
StrComp would work since it's not a CF keyword. I tried using
Compare, and that did not work.
Here is the completed code that works:
<cffunction name="IsJobKeyUnique" access="public"
returntype="boolean" output="false">
<cfargument name="jk" type="string" required="yes">
// default to True that jobkey is unique
<cfset ret=True>
<cfquery name="temp" datasource="lrs">
SELECT * FROM jobkeys WHERE
StrComp(jobkey,'#ARGUMENTS.jk#',0)=0
</cfquery>
<cfif temp.RecordCount NEQ 0>
// a match was found so the jobkey is not unique, return
False
<cfset ret=False>
</cfif>
<cfreturn ret>
</cffunction>
The function only checks if the passed string can be found in
the database and if it is, then its not unique. Is there a more
logical way to do it using COUNT or some other way ?
But anywho, it works as is, but I'm always looking to improve
on things.
Thanks again