|
Is it possiblt to Use <cfif> inside <cfquery> ?
I have a <cfquery> in a Function like below
<cfquery name = "UpdateRecord" dataSource = #arguments.dbSource# username = #arguments.dbUser# password = #arguments.dbPass# result="updateResult...
Started by CFUser on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
By the way - what's the point of such a thing:
<cfquery name = "UpdateRecord" dataSource....
The livedocs for cfargument.
You can, however, set a default cfquery statements.
No, you can't use a cfif in the attribute section of cfquery .
|
|
Hello,
I am trying to fire Update Query using cfquery like below
<cfquery name = "UpdateRecord" dataSource = #DATASOURCE# username = #DBUSER# password = #DBPASSWORD# result="updateResult" > update table1 set field1=( select field1 from table2 where...
Started by CFUser on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Did you try wrapping your update within PreserveSingleQuotes?
<cfquery name.
Injection.
|
|
Is it possible to Execute 2 insert or Update Statements using cfquery ?
If yes how?
if no, what is the best way to execute multiple queries in Coldfusion, by opening only one Connection to DB.
I think every time we call cfquery we are opening new connection...
Started by CFUser on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Something like:
<cfquery name;cftransaction> <cfquery name="ins" datasource="dsn"> insert into table1 values(<cfqueryparam value="#url.x#">) </cfquery> ....
I don't have CF server to try, but it should work fine IIRC .
|
Ask your Facebook Friends
|
I have inherited a large legacy coldfusion app. There are hundreds of <cfquery>some sql here #variable#</cfquery> statements that need to be parameterized along the lines of: <cfquery> some sql here <cfqueryparam value="#variable#...
Started by Nathan Feger on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
THere's a queryparam scanner that'll find em for you on RIAForge: http://qpscanner.riaforge.org/
There is a script referenced here: http://www.webapper.net/index.cfm/2008/7/22/ColdFusion-SQL-Injection that will do the majority of the heavy lifting for... .
|
|
I had to change the SQL stored procedure to ORacle stored procddure.I am able to successfully execute my modified stored procedure in oracle.
But unable to obtain the query result in CF for the Oracle stored-Procedure.I have used <cfquery> .
Any...
Started by vas on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
It does really, then try it via cfquery or stored procedure....
See manual page for more details.
Think you need cfstoredproc , not cfquery .
|
|
I am having a hard time figuring out why when the cfquery runs in my code it is only returning one row when it should be returning three rows.
In almost all cases this cfquery is returning the correct data. For one or two users the cfquery is returning...
Answer Snippets (Read the full thread at stackoverflow):
I suggest the following test scenario:
<cfquery name="AllUsers"> <cfquery name="SingleUser" datasource="#DSN#"> SELECT u.user_no, u.username.
That I'd not consider it a possibility.
|
|
I am wondering if there are java methods/objects that would be alternatives to cfquery, that both allow variable sanitation, and better caching methods.
I know that you can use information schema to get data types and char lengths, and then use that to...
Started by crosenblum on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
So, I think your question....
I'm not really sure what you mean by "everyone converting," either, since using it has been widely considered a best practice for a while .
On CF8+, you can cache queries that use cfqueryparam.
First, let's eliminate a misconception.
|
|
At first I was thinking I was running into an issue with cfqueryparam and mysql. However when I change substitute them with static values I get the same error. This is stumping me, I'm too used to Microsoft SQL Server I guess. Any help would be greatly...
Started by mc on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
<cfquery....
Something like this may work.
CFGears is right, you can't put multiple queries in a single .
MySQL denies this by defualt, so each of your update and insert statements have to be in their own cfquery tags.
In the same cfquery.
|
|
I've been trying to run a dynamic query inside a cfquery tag. Previously it was running fine. So now, I can see the debugger enter the cfquery tag, but it does not finish running. It didn't seem to have made an affect to the database, since nothing was...
Started by joyceschan on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Have you tried running the raw query directly in the database? What db are you using? .
My gut instinct says deadlock or cross join.
There is going to be something horribly wrong with it .
Post your query.
|
|
Hello,
I really liked the cfquery in coldfusion and I'm wondering if anyone has attempted to write something like it for asp.net/C#. Or, does anyone know how they do it in cf with Java? I'd like an interface to my database that is similar
QueryResult ...
Answer Snippets (Read the full thread at stackoverflow):
You will need to reference the appropriate....
But if you really want to, something like the following should get you started .
Normally these days in the dot net world we use an ORM or similar tool (NHibernate, Linq-to-Sql, SubSonic, Entity Framework, etc) .
|