Re: slow cfquery cfqueryparam?

2010-11-10 Thread Will Tomlinson
Hi, I am running the following cfquery which inserts a large amount of rows into a table (approx 2200) Just out of curiosity, where does your insert data originate from? ~| Order the Adobe Coldfusion Anthology now! http

Re: slow cfquery cfqueryparam?

2010-11-10 Thread Jochem van Dieten
On Wed, Nov 10, 2010 at 12:40 AM, Richard White wrote: [query with 6600 cfqueryparams taking 9 seconds vs. 1 for plain SQL] In understand that adding the cfqueryparam is adding approx 6600 validations, however would it really be the cause of slowing this query down so much? cfqueryparam is

slow cfquery cfqueryparam?

2010-11-09 Thread Richard White
Hi, I am running the following cfquery which inserts a large amount of rows into a table (approx 2200) cfquery name=insertData datasource=dbname INSERT INTO parentquestions VALUES cfloop index=i from=1 to=#arraylen(questionIDArray)# cfif i neq 1,/cfif (cfqueryparam value

cfquery and carriage return

2010-10-13 Thread Richard White
Hi, i have data stored in the database with a carriage return. however, when coldfusion pulls the data out with cfquery it seems to lose the carriage return, i dump out the query and it doesnt show the carriage return. i tried looping through each character in the string and outputting

Re: cfquery and carriage return

2010-10-13 Thread Richard White
stored in the database with a carriage return. however, when coldfusion pulls the data out with cfquery it seems to lose the carriage return, i dump out the query and it doesnt show the carriage return. i tried looping through each character in the string and outputting the ascii value and none

Javascript Cfquery

2010-10-12 Thread fun and learning
Hi All - I am trying to do the following: script language=text/javascript function abc(arg1, arg2) { cfquery name=q datasource=.. select * from table1 where col1 = arg1 /cfquery .. } /script Is it possible to pass javascript arguments to a coldfusion

Re: Javascript Cfquery

2010-10-12 Thread Ian Skinner
On 10/12/2010 1:20 PM, fun and learning wrote: Hi All - I am trying to do the following: script language=text/javascript function abc(arg1, arg2) { cfquery name=q datasource=.. select * from table1 where col1 = arg1 /cfquery

Re: Javascript Cfquery

2010-10-12 Thread Charlie Griefer
On Tue, Oct 12, 2010 at 1:20 PM, fun and learning funandlrnn...@gmail.comwrote: Hi All - I am trying to do the following: script language=text/javascript function abc(arg1, arg2) { cfquery name=q datasource=.. select * from table1 where col1 = arg1 /cfquery

cfquery, cachedwithin and cfscript

2010-10-01 Thread rex
Does anyone know how to cache a query using cfquery but in cfscript? This works, query is cached for a day: cfquery name=otherQry datasource=stuff cachedwithin=1 SELECT GETDATE() /cfquery cfdump var=#otherQry# But this doesn't, it's always cached = false: cfscript

cfquery not returning results with apostrophe

2010-09-16 Thread Richard White
hi, we are running a cfquery with the following sql statement: SELECT viewname, categoryname FROM views LEFT OUTER JOIN viewcategories on views.categoryid = viewcategories.categoryid GROUP BY viewname HAVING categoryname IN ('s) ORDER BY viewname ASC LIMIT 0, 300 if we type this directly

Re: cfquery not returning results with apostrophe

2010-09-16 Thread Rick Root
Aside from my trepidations about generating SQL like this because it prevents you from using cfqueryparam, what you're looking for is #preserveSingleQuotes()# coldfusion automatically escapes any single quotes in variables that are within a cfquery tag so if your query SQL is a variable cfquery

Re: cfquery not returning results with apostrophe

2010-09-16 Thread Michael Grant
you're looking for is #preserveSingleQuotes()# coldfusion automatically escapes any single quotes in variables that are within a cfquery tag so if your query SQL is a variable cfquery ... select blah blah blah from blah group by blah #preserveSingleQuotes(havingClause)# /cfquery

Re: cfquery not returning results with apostrophe

2010-09-16 Thread Russ Michaels
for is #preserveSingleQuotes()# coldfusion automatically escapes any single quotes in variables that are within a cfquery tag so if your query SQL is a variable cfquery ... select blah blah blah from blah group by blah #preserveSingleQuotes(havingClause)# /cfquery Otherwise, the single quotes get doubled up

Re: cfquery not returning results with apostrophe

2010-09-16 Thread Richard White
thanks for the replies, although the preserveSingleQuotes doesnt work hi, we are running a cfquery with the following sql statement: SELECT viewname, categoryname FROM views LEFT OUTER JOIN viewcategories on views.categoryid = viewcategories.categoryid GROUP BY viewname HAVING

Re: cfquery not returning results with apostrophe

2010-09-16 Thread Ian Skinner
On 9/16/2010 6:44 AM, Richard White wrote: thanks for the replies, although the preserveSingleQuotes doesnt work You should be looking at the actual SQL that is being sent to the database. It would be provide clear evidence of what is wrong. Looking at this line: cfset havingClause =

Re: cfquery not returning results with apostrophe

2010-09-16 Thread Jason Fisher
Or instead of using a variable, if you can just put the clause in the SQL statement, let the list param do the work for you: HAVING categoryname IN ( cfqueryparam cfsqltype=cf_sql_varchar value=#arrayToList(value)# list=Yes / )

Re: cfquery not returning results with apostrophe

2010-09-16 Thread Rick Root
Wrap your actual cfquery with cftry and then cfoutput the variable cfcatch.sql cftry cfquery.../cfquery cfcatch type=Databasecfoutputpre#cfcatch.sql#/pre/cfoutput/cfcatch /cftry Then post that sql here. Rick ~| Order

Re: cfquery not returning results with apostrophe

2010-09-16 Thread Richard White
cfquery with cftry and then cfoutput the variable cfcatch.sql cftry cfquery.../cfquery cfcatch type=Databasecfoutputpre#cfcatch.sql#/pre/cfoutput/cfcatch /cftry Then post that sql here. Rick ~| Order the Adobe Coldfusion

Re: cfquery not returning results with apostrophe

2010-09-16 Thread Jason Fisher
of setting your havingClause variable and messing with preserveSingleQuotes(), can you just do this? cfquery SELECT viewname, categoryname FROM views LEFT OUTER JOIN viewcategories ON views.categoryid = viewcategories.categoryid GROUP BY viewname HAVING 0 = 0 AND categoryname

Re: cfquery not returning results with apostrophe

2010-09-16 Thread Richard White
character at a time. the apostophe was printed as '%apos;' even though it appeared as ' in the sql statement! have taken on board comments re cfqueryparam and now that this error is fixed will update it to include the sql injection thanks for all the help :) hi, we are running a cfquery

cfquery to json array

2010-06-07 Thread Richard White
hi, is there a quick and easy way to convert a cfquery into a json array. i will be returning the json array to extjs to present in a grid thanks ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe

Re: cfquery to json array

2010-06-07 Thread Michael Grant
Google is your friend: Search cfquery to json and get: http://www.coldfusionjedi.com/index.cfm/2007/9/20/Quick-and-Dirty-JSONQuery-Example On Mon, Jun 7, 2010 at 11:53 AM, Richard White rich...@j7is.co.uk wrote: hi, is there a quick and easy way to convert a cfquery into a json array. i

Re: cfquery to json array

2010-06-07 Thread Richard White
thanks, sorry dont think i was clear enough, i knew about serializejson but this doesnt work with extjs, in case anyone else stumbles on this post and is interested i found the following: http://blog.cutterscrossing.com/index.cfm/CFQueryReader Google is your friend: Search cfquery to json

Re: cfquery to json array

2010-06-07 Thread Richard White
/index.cfm/CFQueryReader Google is your friend: Search cfquery to json and get: http://www.coldfusionjedi.com/index. cfm/2007/9/20/Quick-and-Dirty-JSONQuery-Example ~| Order the Adobe Coldfusion Anthology now

Re: cfquery to json array

2010-06-07 Thread Cutter (ColdFusion)
/CFQueryReader Google is your friend: Search cfquery to json and get: http://www.coldfusionjedi.com/index. cfm/2007/9/20/Quick-and-Dirty-JSONQuery-Example ~| Order the Adobe Coldfusion Anthology now

cfquery within javascript

2010-04-14 Thread fun and learning
hi, I am trying to do the following: I wrote a cfquery within javascript function as below: script language=javascript1.2 type=text/javascript cfquery name=query1 datasource=abc /cfquery cfif query1.recordcount neq 0 cfoutput query = query1 cfquery name=query2 datasource=abc

RE: cfquery within javascript

2010-04-14 Thread Robert Harrison
Subject: cfquery within javascript hi, I am trying to do the following: I wrote a cfquery within javascript function as below: script language=javascript1.2 type=text/javascript cfquery name=query1 datasource=abc /cfquery cfif query1.recordcount neq 0 cfoutput query = query1

RE: cfquery within javascript

2010-04-14 Thread Andrew Scott
Any reason you are doing it this way and not just no javascript and use cfdump instead? -Original Message- From: fun and learning [mailto:funandlrnn...@gmail.com] Sent: Thursday, 15 April 2010 6:13 AM To: cf-talk Subject: cfquery within javascript hi, I am trying to do the following

RE: cfquery within javascript

2010-04-14 Thread Sebastiaan GMC van Dijk
2010 6:13 AM To: cf-talk Subject: cfquery within javascript hi, I am trying to do the following: I wrote a cfquery within javascript function as below: script language=javascript1.2 type=text/javascript cfquery name=query1 datasource=abc /cfquery cfif query1.recordcount neq

cfquery writing to the wrong table..

2010-04-07 Thread Phillip Vector
? === * Up to this point in the code, the data is correct and stored on Accounting_Temp correctly. * cfquery datasource=#Datasource# name=Check Select * from Accounting_Temp /cfquery cfset updated=0 cfset Added=0 * Still looking good.. * cfloop query=Check

CFQUERY Question

2010-03-31 Thread Dave Sueltenfuss
I'm running into an odd behavior with CFQUERY (at least I think it is odd) I have the following code (example) cfquery name=blahName datasource=blah SELECT blah FROM blah WHERE blah = 1 /cfquery CFIF blahName.recordCount GT 0 12345 /CFIF if the query blahName returns no results

RE: CFQUERY Question

2010-03-31 Thread Rick Faircloth
31, 2010 1:59 PM To: cf-talk Subject: CFQUERY Question I'm running into an odd behavior with CFQUERY (at least I think it is odd) I have the following code (example) cfquery name=blahName datasource=blah SELECT blah FROM blah WHERE blah = 1 /cfquery CFIF blahName.recordCount GT 0

Re: CFQUERY Question

2010-03-31 Thread Steve Milburn
You are correct, the record count for an empty query object does exist (and should be 0). What exactly is not working? Are you getting an error message? On Wed, Mar 31, 2010 at 1:59 PM, Dave Sueltenfuss dsueltenf...@gmail.comwrote: I'm running into an odd behavior with CFQUERY (at least I

RE: CFQUERY Question

2010-03-31 Thread Robert Harrison
/unplugged -Original Message- From: Dave Sueltenfuss [mailto:dsueltenf...@gmail.com] Sent: Wednesday, March 31, 2010 1:59 PM To: cf-talk Subject: CFQUERY Question I'm running into an odd behavior with CFQUERY (at least I think it is odd) I have the following code (example) cfquery name

Re: CFQUERY Question

2010-03-31 Thread Dave Sueltenfuss
-williams.com Great advertising can't be either/or. It must be . Plug in to our blog: AW Unplugged http://www.austin-williams.com/unplugged -Original Message- From: Dave Sueltenfuss [mailto:dsueltenf...@gmail.com] Sent: Wednesday, March 31, 2010 1:59 PM To: cf-talk Subject: CFQUERY Question

Re: CFQUERY Question

2010-03-31 Thread Maureen
running into an odd behavior with CFQUERY (at least I think it is odd) I have the following code (example) cfquery name=blahName datasource=blah   SELECT blah     FROM blah   WHERE blah = 1 /cfquery CFIF blahName.recordCount GT 0   12345 /CFIF if the query blahName returns no results, I

Re: Repeating Data - Unsure of my use of cfquery

2010-03-16 Thread Steven Sprouse
I got my original form to output the way I wanted it to. Now, I'm trying to actually process and validate that form and I'm running into more errors. I sort of know what I'm doing wrong, but unclear how to fix it. Here is my error: Invalid tag nesting configuration. A query driven CFOUTPUT

RE: Repeating Data - Unsure of my use of cfquery

2010-03-16 Thread Chad Gray
You can put a CFLoop query=foo inside of a cfoutput query=moo tag. -Original Message- From: Steven Sprouse [mailto:sspro...@ccboe.com] Sent: Tuesday, March 16, 2010 10:39 AM To: cf-talk Subject: Re: Repeating Data - Unsure of my use of cfquery I got my original form to output the way

Re: Repeating Data - Unsure of my use of cfquery

2010-03-16 Thread Ian Skinner
cfoutput query=aQuery cfoutput query=bQuery /cfoutput /cfoutput That is illegal because ColdFusion does some automatic variable scoping that would just not work in such a situation. To do this you have to use the cfloop query... form. I.E. cfoutput cfloop query=aQuery cfloop

Re: Repeating Data - Unsure of my use of cfquery

2010-03-16 Thread Steven Sprouse
Just so I'm clear, are you saying that I need to change my #aQuery.aColumn[aQuery.currentRow]# formatting within the form? For example, I need to change this: cfoutput query=getSchools option

Re: Repeating Data - Unsure of my use of cfquery

2010-03-16 Thread Ian Skinner
On 3/16/2010 8:22 AM, Steven Sprouse wrote: If so, what is the currentRow value? Just a little confused there. currentRow is one of the values provided by ColdFusion about its query objects, just like columnList and recordCount. It is simple the current row of the record set that is being

Repeating Data - Unsure of my use of cfquery

2010-03-15 Thread Steven Sprouse
I posted a few days ago about having multiple cfquery statements in the same document. After some troubleshooting, I finally figured out how to do this. I began building my test form, which is populated from fields in a database, I'm running into a problem where the data is just being repeated

Re: Repeating Data - Unsure of my use of cfquery

2010-03-15 Thread Steven Sprouse
My Code: (link to live page - http://www2.ccboe.com/summeracademy/app/emp/index.cfm) cfquery name=getSchools datasource=filemaker_schools SELECT SchNum, SchoolBrief FROM SCHOOLS ORDER BY SchoolBrief /cfquery cfquery name=getSrastaff datasource=filemaker_srmastaff SELECT ApplySubject

Re: Repeating Data - Unsure of my use of cfquery

2010-03-15 Thread Barney Boisvert
reference to other pages that might help. If you get that query sorted you should be all set. cheers, barneyb On Mon, Mar 15, 2010 at 6:21 AM, Steven Sprouse sspro...@ccboe.com wrote: My Code: (link to live page - http://www2.ccboe.com/summeracademy/app/emp/index.cfm) cfquery name=getSchools

Re: Repeating Data - Unsure of my use of cfquery

2010-03-15 Thread James Holmes
pages that might help. If you get that query sorted you should be all set. cheers, barneyb On Mon, Mar 15, 2010 at 6:21 AM, Steven Sprouse sspro...@ccboe.com wrote: My Code: (link to live page - http://www2.ccboe.com/summeracademy/app/emp/index.cfm) cfquery name=getSchools datasource

Re: Repeating Data - Unsure of my use of cfquery

2010-03-15 Thread Steven Sprouse
Barney, would that require that the different tables have a linking relationship? I think that's my problem. There is no common field shared among these tables. ~| Want to reach the ColdFusion community with something they

Re: Repeating Data - Unsure of my use of cfquery

2010-03-15 Thread James Holmes
Just separate each table into its own query. Use the data from the right table in the right place and the problem is solved. mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ On 15 March 2010 22:39, Steven Sprouse sspro...@ccboe.com wrote: Barney, would that

Re: Repeating Data - Unsure of my use of cfquery

2010-03-15 Thread Steven Sprouse
You guys are awesome. Sometimes it's the easiest things... ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive:

RE: Two CFQUERY statements?

2010-03-12 Thread Bobby Hartsfield
To: cf-talk Subject: Re: Two CFQUERY statements? On Thu, Mar 11, 2010 at 3:35 PM, Barney Boisvert bboisv...@gmail.comwrote: You can happily query multiple databases within the same request; what you can't do is query multiple databases within a single transaction. So as long as your CFQUERY tags

RE: Two CFQUERY statements?

2010-03-12 Thread Bobby Hartsfield
Make sure the name you gave your datasource in the CF Administrator is the same as the name you are using in the name attribute of your cfquery tag. CF Appears to think there is no datasource with the name you are trying to use. -Original Message- From: Steven Sprouse [mailto:sspro

Two CFQUERY statements?

2010-03-11 Thread Steven Sprouse
I have someone who has two separate databases and they want me to write a Web form generating option menus from both databases. I have set up both as separate data sources in my Coldfusion administrator and have included one cfquery at the head of my document generating a list of locations

Re: Two CFQUERY statements?

2010-03-11 Thread Barney Boisvert
You can happily query multiple databases within the same request; what you can't do is query multiple databases within a single transaction. So as long as your CFQUERY tags don't share a CFTRANSACTION block you should be fine. Can you post the actual error message? cheers, barneyb On Thu, Mar

RE: Two CFQUERY statements?

2010-03-11 Thread LRS Scout
inside one another? If so that won't work, you have to use cfloop instead. -Original Message- From: Steven Sprouse [mailto:sspro...@ccboe.com] Sent: Thursday, March 11, 2010 3:26 PM To: cf-talk Subject: Two CFQUERY statements? I have someone who has two separate databases and they want me

Re: Two CFQUERY statements?

2010-03-11 Thread Casey Dougall
On Thu, Mar 11, 2010 at 3:35 PM, Barney Boisvert bboisv...@gmail.comwrote: You can happily query multiple databases within the same request; what you can't do is query multiple databases within a single transaction. So as long as your CFQUERY tags don't share a CFTRANSACTION block you

Re: Two CFQUERY statements?

2010-03-11 Thread Steven Sprouse
You'll have to excuse me, I'm still sort of a CF novice so I'm not too familiar with how to use CFTRANSACTION. What I was doing was just putting two separate CFQUERY statements at the head of my document, each with a different name attribute and different data sources. When I did my cfoutput

Re: Two CFQUERY statements?

2010-03-11 Thread Roger Austin
Steven Sprouse sspro...@ccboe.com wrote: If one of the databases was converted into a table and placed into the other database, I'd have no problem with this, but for some reason I'm getting tripped up with the different data sources. More than likely, this is a permissions issue on

Re: Two CFQUERY statements?

2010-03-11 Thread Eric Cobb
Sounds like ColdFusion is having problems connecting to one of your databases. Try this: 1) make sure you can verify both datasources in your ColdFusion Administrator. 2) make sure you didn't misspell one of the datasource names in your cfquery tags. thanks, eric cobb ecar technologies

problem with a condition cfif in a cfquery

2010-03-03 Thread alex poyaoan
below but doesn't work cfquery name=recipients datasource=labels SELECT cfif (emailaddr1)eq emailaddr2, cfelse emailaddr1/cfif /cfquery cfoutput#recipients#/cfoutput thanks ~| Want to reach the ColdFusion community with something

Re: problem with a condition cfif in a cfquery

2010-03-03 Thread alex poyaoan
the addresses that if emailaddr1 is empty it would be substituted by emailaddr2. I tried using a cfif inside the query written below but doesn't work cfquery name=recipients datasource=labels SELECT cfif (emailaddr1)eq emailaddr2, cfelse emailaddr1/cfif /cfquery cfoutput#recipients#/cfoutput

Re: problem with a condition cfif in a cfquery

2010-03-03 Thread alex poyaoan
written below but doesn't work cfquery name=recipients datasource=labels SELECT cfif (emailaddr1)eq emailaddr2, cfelse emailaddr1/cfif /cfquery cfoutput#recipients#/cfoutput thanks ~| Want to reach the ColdFusion

RE: problem with a condition cfif in a cfquery

2010-03-03 Thread Dave Phillips
Alex, You can't use a CF condition within your SQL that you want to evaluate each record in the query. For that, you'd need to use an SQL condition. You could use CF conditions inside your cfquery only to evaluate the 'text' of the query (like to decide WHICH SQL statement to use for example

Re: problem with a condition cfif in a cfquery

2010-03-03 Thread alex poyaoan
THANKS DAVE THAT SOLVED IT!!! Alex, You can't use a CF condition within your SQL that you want to evaluate each record in the query. For that, you'd need to use an SQL condition. You could use CF conditions inside your cfquery only to evaluate the 'text' of the query (like to decide WHICH

Need to convert all CFquery tags to lowercase

2010-02-26 Thread phil phil
Hello, I do need to migrate from Access to MySQL on a Windows and shared server environment. All existing queries (approx 2000) are failing because they are not lowercased. Does anyone know of a script that would look into every files for the CFquery tag and lowercase its content between

Re: Need to convert all CFquery tags to lowercase

2010-02-26 Thread Michael Dinowitz
Do you need all of the query lowercased or is there part that you want to keep uppercased? If you don't care then this regex will do the job: (cfquery[^]+.+?/cfquery) \L\1 The first line grabs all cfquery tags and their content and the second like converts it to lower case. I'd test the regex

Re: Need to convert all CFquery tags to lowercase

2010-02-26 Thread Maureen
Access to MySQL on a Windows and shared server environment. All existing queries (approx 2000) are failing because they are not lowercased. Does anyone know of a script that would look into every files for the CFquery tag and lowercase its content between? This is the only solution

Re: Need to convert all CFquery tags to lowercase

2010-02-26 Thread phil phil
Thanks Michael, Ideally I would like to keep the comments in Uppercase but can do without it. You can use just about any regex tool to do the job, including writing a fast tool in CF to do the job. I am not sure how to use it but will play with it. (cfquery[^]+.+?/cfquery) \L\1

Re: Need to convert all CFquery tags to lowercase

2010-02-26 Thread phil phil
As far as I know there is no requirement in MySQL for queries to be lowercase. I just ran one in all uppercase and it worked fine. There has to be something else causing this problem. Are you on Linux? It is not the case for Windows with my hosting company which is unable to change system

Re: Need to convert all CFquery tags to lowercase

2010-02-26 Thread phil phil
It cost me to make the below code to work. Should I use a Rereplace expression? (cfquery[^]+.+?/cfquery) \L\1 Thanks in advance for your feedbacks Do you need all of the query lowercased or is there part that you want to keep uppercased? If you don't care then this regex will do the job

RE: Need to convert all CFquery tags to lowercase

2010-02-26 Thread Andrew Scott
If I recall right, you have to switch case sensitivity on, are you saying that is what your host has done? -Original Message- From: phil phil [mailto:arantxa...@gmail.com] Sent: Friday, 26 February 2010 8:58 PM To: cf-talk Subject: Need to convert all CFquery tags to lowercase

Re: Need to convert all CFquery tags to lowercase

2010-02-26 Thread phil phil
that would look into every files for the CFquery tag and lowercase its content between? This is the only solution that comes to me but maybe there is a easier way? Thanks in advance for any feedbacks. Phil ~| Want to reach

Re: Need to convert all CFquery tags to lowercase

2010-02-26 Thread Michael Dinowitz
yes. REReplace. The pattern your trying to match is the first line. It says that we're looking to capture something that starts with a cfquery tag, has content, and then ends with a closing cfquery tag. The replace has a \L before the content returned from the pattern (the query tag). \L means

RE: Need to convert all CFquery tags to lowercase

2010-02-26 Thread Andrew Scott
Have you tried talking to your hosting provider, and switch case sensitivity off for your database? -Original Message- From: phil phil [mailto:arantxa...@gmail.com] Sent: Friday, 26 February 2010 11:40 PM To: cf-talk Subject: Re: Need to convert all CFquery tags to lowercase It seems

Re: Need to convert all CFquery tags to lowercase

2010-02-26 Thread Jochem van Dieten
On Fri, Feb 26, 2010 at 2:01 PM, Andrew Scott wrote: Have you tried talking to your hosting provider, and switch case sensitivity off for your database? That is not a per-database setting. Once you have it set to some setting and have clients on it, a hosting provider is committed and can not

Re: Need to convert all CFquery tags to lowercase

2010-02-26 Thread Gerald Guido
But why not do the conversion on the Access side before migrating to MySQL? In Access you can simply rename the tables to the case you use in your queries before you convert them. IIRC there is a setting in my.cnf that will automatically lower case table names. To turn it off you have to

Re: Need to convert all CFquery tags to lowercase

2010-02-26 Thread phil phil
Problem is that in my code over the years the table name can be as 'Company' or 'company' so just changing the table names in mysql to lowercase is not enough but yes a necessary step (can do it from the GUI: PHPadmin) Then as you wrote changing all occurrences of the table names (1500 cfquery

cfquery return datatypes

2010-02-26 Thread Joshua Rowe
Hello. Is there a way to return a datatype list from your query along with the column list? Example: cfquery name=qryTest datasource=test SELECT * FROM tblTest; /cfquery cfoutput #qryTest.columnlist#br #qryTest.datatypes# /cfoutput Thanks

Re: cfquery return datatypes

2010-02-26 Thread Leigh
Hello.  Is there a way to return a datatype list from your query along with the column list?  Example: IIRC, there is no direct method. But you could certainly extract that information using getMetaData() cfdump var=#getMetaData(qryTest)#

Re: Need to convert all CFquery tags to lowercase

2010-02-26 Thread Jochem van Dieten
of the table names (1500 cfquery tags) to lowercase. I choose lowercase but it could be also uppercase as long as everything on the code and db is coherent. Anyway that is the only solution that I find at this time. How invested are you in MySQL? If your hoster offers PostgreSQL you could use

Re: Need to convert all CFquery tags to lowercase

2010-02-26 Thread phil phil
I tried this but as you can see I am REgex illiterate and more... REReplaceNoCase(TheFile,(cfquery[^]+.+?/cfquery),(cfquery[^]+.+?/cfquery\L\1),all) It will return the content of the cfquery but I am cannot find a way to lowercase it properly. Thanks yes. REReplace. The pattern your trying

re: cfquery return datatypes

2010-02-26 Thread Jason Fisher
You can usually get that info from the database's system tables, depending on your RDBMS. (In the following queries, 'typename' will give you the datatype.) MSSQL: SELECT syscolumns.colid, syscolumns.name, syscolumns.colorder AS sortorder,

Re: cfquery return datatypes

2010-02-26 Thread Gerald Guido
. ORDINAL_POSITION Ordinal position of the column. REMARKS Remarks of the column. On Fri, Feb 26, 2010 at 12:13 PM, Joshua Rowe joshua.r...@varimereweb.comwrote: Hello. Is there a way to return a datatype list from your query along with the column list? Example: cfquery name=qryTest datasource

RE: CF9 cfquery not giving same insert results as CF7

2010-01-29 Thread DURETTE, STEVEN J (ATTASIAIT)
: Thursday, January 28, 2010 9:10 PM To: cf-talk Subject: Re: CF9 cfquery not giving same insert results as CF7 I've found a query that used Select @@Identity as NewAgentID without having a Set NoCount on or off. This query still worked and did not have to be altered at all. That brings up

Re: CF9 cfquery not giving same insert results as CF7

2010-01-29 Thread Michael Dinowitz
Thanks. This gives me a bit of extra information on top of the research I've done on the topic. Now comes a few extended questions. :) 1. When a cfquery has a result attribute defined, it will return data about the query and in the case of an insert, the id of the inserted item. The assumption

RE: CF9 cfquery not giving same insert results as CF7

2010-01-29 Thread DURETTE, STEVEN J (ATTASIAIT)
29, 2010 9:37 AM To: cf-talk Subject: Re: CF9 cfquery not giving same insert results as CF7 Thanks. This gives me a bit of extra information on top of the research I've done on the topic. Now comes a few extended questions. :) 1. When a cfquery has a result attribute defined, it will return data

RE: CF9 cfquery not giving same insert results as CF7

2010-01-29 Thread Leigh
As for the SET NOCOUNT ON and SET NOCOUNT OFF, they have no effect on these.  The only thing that does is prevent extra network traffic by stopping the extra reporting of how many rows were affected for each piece of the query. In CF8 it did have an effect on cfquery's in some situations.

Re: CF9 cfquery not giving same insert results as CF7

2010-01-28 Thread Michael Dinowitz
commands?? cfquery name=addAgent SET NOCOUNT ON insert into users_printprofiles ( ) values( ) select newid=@@identity SET NOCOUNT OFF /cfquery Brook -Original Message- From: Michael Dinowitz [mailto:mdino...@houseoffusion.com] Sent: January-27-10 1:26 PM To: cf-talk Subject: Re

CF9 cfquery not giving same insert results as CF7

2010-01-27 Thread Michael Dinowitz
I just ran into this and while it's new to me, I'm sure it's old news to others here. I'm looking at someones code from CF 7 where they have a cfquery inserting a record. The cfquery tag only has a name and a datasource. Immediately after the tag, there is a cfset that makes use of the query's

Re: CF9 cfquery not giving same insert results as CF7

2010-01-27 Thread Michael Dinowitz
OK, so it turns out that this is a known issue that came into effect between CF 7 and CF 8. I can do one of three things here. 1. replace the name attribute with the result attribute: cfquery name=AddAgent becomes cfquery result=AddAgent 2. add a result attribute of the same name

Re: CF9 cfquery not giving same insert results as CF7

2010-01-27 Thread Mahcsig
that this is a known issue that came into effect between CF 7 and CF 8. I can do one of three things here. 1. replace the name attribute with the result attribute: cfquery name=AddAgent becomes cfquery result=AddAgent 2. add a result attribute of the same name to the cfquery cfquery name

RE: CF9 cfquery not giving same insert results as CF7

2010-01-27 Thread Brook Davies
I am curious, does the query use the NOCOUNT and @@identity SQL commands?? cfquery name=addAgent SET NOCOUNT ON insert into users_printprofiles ( ) values( ) select newid=@@identity SET NOCOUNT OFF /cfquery Brook -Original Message- From: Michael Dinowitz

cfquery timeout doesn't work out on jdbc driver

2009-10-08 Thread Vamsi Pappu
Hi All, I have a situation here where cfquery doesn't seem to be performing well on jdbc driver, when I read in forums it was clearly mentioned that cfquery timeout doesn't support some drivers, Is there any another alternate to this. My requirement is no matter what happens, if query

RE: cfquery timeout doesn't work out on jdbc driver

2009-10-08 Thread brad
themselves, often the only way to ensure such a timeout is with a second monitor thread. ~Brad Original Message Subject: cfquery timeout doesn't work out on jdbc driver From: Vamsi Pappu vissu.va...@gmail.com Date: Thu, October 08, 2009 7:47 am To: cf-talk cf-talk@houseoffusion.com

Re: cfquery timeout doesn't work out on jdbc driver

2009-10-08 Thread Adam Haskell
Run it in a thread with CFthread and put a timeout on the cfjoin. Adam On Thu, Oct 8, 2009 at 8:47 AM, Vamsi Pappu vissu.va...@gmail.com wrote: Hi All, I have a situation here where cfquery doesn't seem to be performing well on jdbc driver, when I read in forums it was clearly mentioned

Re: cfquery timeout doesn't work out on jdbc driver

2009-10-08 Thread Rick Root
: Hi All, I have a situation here where cfquery doesn't seem to be performing well on jdbc driver, when I read in forums it was clearly mentioned that cfquery timeout doesn't support some drivers, Is there any another alternate to this. My requirement is no matter what happens, if query

Need help with cfquery for a sort and a group

2009-09-12 Thread Traci Porter
Hello. I'm hoping someone here can help me. I have a search form that is submitted (with a number of criteria but for this purpose) with a proposal number (Pipe_id) and what type of file the user is looking for (proposal (chkProposal), solicitation (chkSolicitation), debrief (chkDebrief)).

RE: Need help with cfquery for a sort and a group

2009-09-12 Thread Chuck
Traci, For the recordset that you already have. Pipe_id File_id File_title = 989910proposalrevision.doc 989910tableofcontents.doc 989911

cfquery

2009-07-22 Thread RamaDevi Dobbala
cfquery datasource=askseaton name=getOffices result=varibles select address + ' ' + address2 + ' ' + address3 + ',' + city + ',' + state + ',' + city as office_address, (select first + ' ' + last as full from user_info where

re: cfquery

2009-07-22 Thread Jason Fisher
I think you want it this way, using a CASE statement for the leadmgr column. I also moved all your subselects into left joins, which should give a bit better performance. cfquery datasource=askseaton name=getOffices result=varibles select s.address + ' ' + s.address2 + ' ' + s.address3

Re: cfquery

2009-07-22 Thread RamaDevi Dobbala
cfquery datasource=askseaton name=getOffices select iif(lm.user_id = s.lead_mgr, (lm.first + ' ' + lm.last) , s.lead_note) as leadMgr

CFLOOP inside a CFQuery

2009-06-09 Thread Will Blake
machine is located on a separate row. That all works well until they hit submit (or will hit submit if I figure out the next part). How do I create a cfquery that has the correct number of values so that each machines data is stored correctly? For example I will have row one with lets say

<    1   2   3   4   5   6   7   8   9   10   >