It's not possible to load tags into a variable and then execute them directly 
in CF. The entire basis of what your doing would never work (unless you write 
the info to file and cfinclude it but that's a different story for a different 
time)
If you were doing a standard query without any CF tags within the query it 
would work ok, but those tags kill it.

>In the function I replace the locumtenency by the cfqueryparam-tag and run
>the query:
>-------------------------------------------------------------------
><cffunction name="runPreparedQuery" ...>
><cfscript>
>        myNewSql = replace(arguments.mySql, "[CHAR]", chr(60)&"cfqueryparam
>value="&chr(34), "All");
>        myNewSql = replace(myNewSql, "[/CHAR]", chr(34)& "
>cfsqltype="&chr(34)&"CF_SQL_VARCHAR"&chr(34)&chr(62), "All");
></cfscript>
><cfquery name="queryResult" datasource="#dbName#" username="#dbUser#"
>password="#dbPw#">
>       #myNewSql#
></cfquery>
><cfreturn queryResult />
></cffunction>
>-------------------------------------------------------------------
>
>Although the sql-string looks correct if I dump it and it works if I copy it
>directly into the cfquery-tag it throws an database-error in the way I use
>it.
>
>Any ideas???
>
>
>I use CF MX7 and a db2-database
>
>
>
>Thanks a lot in advance,
>Sigi

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236337
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to