GetDSN from other method
Hi,
can some one tell me how to call the dsn from other method within the same cfc.
this getDSN method return me the correct dsn that i declared from application.cfm.
<cffunction name="GetDSN" access="public" output="false" hint="Gets the DSN">
<cfargument name="dsn" required="yes">
<cfreturn this />
</cffunction>
how can i get the dsn from above method. What i have is not working..........
<cffunction name="findDupicate" output="no" access="public" returntype="query">
<cfargument name="form" required="yes" type="struct">
<cfquery name="check_duplicate" datasource="#GetDSN#">
SELECT voucherNo
FROM voucher
WHERE voucherNo= <cfqueryparam value="#arguments.form.voucher#" cfsqltype="cf_sql_varchar" />
</cfquery>
<cfreturn check_duplicate>
</cffunction>
Thanks
