Re: CF 8 - cfquery is returning a struct

2007-10-15 Thread Paul Hastings
Chris Long wrote: that when I do a dump of the query variable, it now displays a struct with the query results as a member of the struct named resultset. it's actually documented. old code still works. But I'm a little concerned and I want to make sure there aren't any potential code issues

Re: CF 8 - cfquery returns a struct?

2007-10-15 Thread J.J. Merrick
I am pretty sure that this is a thing that CFDump does directly. You do not have to now do #queryname.resultset.columnname#... J.J. On 10/15/07, Chris Long [EMAIL PROTECTED] wrote: Has anyone else encountered this? We switched to CF8 this week and I noticed that when I do a dump of the

Re: CF 8 - cfquery returns a struct?

2007-10-15 Thread Brian Kotek
If you look at the CF8 docs on CFQUERY you'll see a full description of what the result structure contains. It doesn't break any existing code, but it does add several useful bits of information that you can use. On 10/15/07, Chris Long [EMAIL PROTECTED] wrote: Has anyone else encountered

CFQUERY Results in Natural SQL Order?

2007-09-20 Thread Todd Mathews
Does anyone know of a simple way to have the results of a CFQUERY return the results in the natural sql result order instead of always returning everything in a sorted column order? IE: Select waypointName, areaName, directionScope, bufferName from xx Should return the columns in the natural

Re: CFQUERY Results in Natural SQL Order?

2007-09-20 Thread James Holmes
I'm sorry I don't have a solution, but I'm really curious; why is the column order important? On 9/20/07, Todd Mathews [EMAIL PROTECTED] wrote: Does anyone know of a simple way to have the results of a CFQUERY return the results in the natural sql result order instead of always returning

RE: CFQUERY Results in Natural SQL Order?

2007-09-20 Thread Rob O'Brien
I've run into very few instances where the alpha sorting of query columns has been a bother. However, I just ran into one yesterday. I wanted to use CFTABLE as a quick and easy way to display an unknown recordset. Using COLUMNLIST from the CFQUERY result wouldn't work - I wanted the 'natural

RE: CFQuery wrapper tag to help with poor connections to sql..

2007-09-13 Thread Daniel Baughman
Interesting. I might trying using the timeout before resorting to the nested try/catches. -Original Message- From: Wil Genovese [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 12, 2007 12:46 PM To: CF-Talk Subject: Re: CFQuery wrapper tag to help with poor connections to sql

CFQuery wrapper tag to help with poor connections to sql..

2007-09-12 Thread Daniel Baughman
Hi, I have an app that has to use a connection that sees a few seconds of disconnectivity from its SQL server occasionaly. I was consdiering writing a wrapper tag to the CFQUERY that would try the query once, if it fails on connection wait 2 seconds and try again, before failing. Anyone done

RE: CFQuery wrapper tag to help with poor connections to sql..

2007-09-12 Thread Rich
I have an app that has to use a connection that sees a few seconds of disconnectivity from its SQL server occasionaly. Dan, You can nest CFTRY's to accomplish this. Something like: cftry cfquery name=users datasource=#myDSN# SELECT user_id FROM users

Re: CFQuery wrapper tag to help with poor connections to sql..

2007-09-12 Thread Wil Genovese
Also remember the timeout attribute for cfquery. It accepts integers as seconds. cfquery name=users datasource=#myDSN# timeout=2 SELECT user_id FROM users /cfquery -- Wil Genovese One man with courage makes a majority. -Andrew Jackson A fine is a tax for doing wrong. A tax

Re: MySQL FullText search with CFQUERY?

2007-08-28 Thread Tom Chiverton
On Friday 24 Aug 2007, [EMAIL PROTECTED] wrote: cfquery SELECT field1, field2 FROM myTABLE WHERE MATCH (field1, field2) AGAINST ('#form.searchINPUT#') /cfquery cfqueryparam ! -- Tom Chiverton Helping to seamlessly iterate revolutionary web-readiness on: http

Re: MySQL FullText search with CFQUERY?

2007-08-28 Thread Les Mizzell
cfquery SELECT field1, field2 FROM myTABLE WHERE MATCH (field1, field2) AGAINST ('#form.searchINPUT#') /cfquery cfqueryparam ! I know! I know! I was just presenting things in their most simple form

Re: MySQL FullText search with CFQUERY?

2007-08-24 Thread Eric Haskins
Make Sure you have the Fields set as Fulltext Eric On 8/23/07, Les Mizzell [EMAIL PROTECTED] wrote: We use MS SQL and utilize full text queries just like any other select query. I suspect that MySQL will work the same. So the below should be a valid query then? cfquery SELECT

RE: MySQL FullText search with CFQUERY?

2007-08-24 Thread Dennis Powers
So the below should be a valid query then? {deleted for brevity} I am unfamiliar with the syntax of MySQL full text queries so I can not be definite however this MSSQL full text query works just fine. cfquery SELECT (KEY_TBL.RANK * 1000) AS RANK, field1, field2 FROM myTable

MySQL FullText search with CFQUERY?

2007-08-23 Thread Les Mizzell
Is it possible to run a full text search using cfquery (after the appropriate columns have been indexed with FULLTEXT )? cfquery SELECT field1, field2 FROM myTABLE WHERE MATCH (field1, field2) AGAINST ('#form.searchINPUT#') /cfquery If not, how would you do this? TIA

RE: MySQL FullText search with CFQUERY?

2007-08-23 Thread Dennis Powers
Is it possible to run a full text search using cfquery We use MS SQL and utilize full text queries just like any other select query. I suspect that MySQL will work the same. Best Regards, Dennis Powers UXB Internet - A website design and Hosting Company 690 Wolcott Road P.O. Box 6029 Wolcott

Re: MySQL FullText search with CFQUERY?

2007-08-23 Thread Les Mizzell
We use MS SQL and utilize full text queries just like any other select query. I suspect that MySQL will work the same. So the below should be a valid query then? cfquery SELECT field1, field2 FROM myTABLE WHERE MATCH (field1, field2) AGAINST ('#form.searchINPUT#') /cfquery

multiple PL/SQL statements in cfquery

2007-08-15 Thread Jake Churchill
I’ve run into an issue where I need to run 2 PL/SQL statements on Oracle in a single cfquery tag. In my SQL developer, I can run 2 at a time using a semi-colon as a delimiter but cfquery errors out on me saying the semi-colon is an invalid character. Here’s the query that I’m trying to run

Re: multiple PL/SQL statements in cfquery

2007-08-15 Thread Tom Chiverton
On Wednesday 15 Aug 2007, [EMAIL PROTECTED] wrote: ALTER SESSION SET NLS_DATE_FORMAT = '­MM­DD HH24:MI:SS'; SELECT SYSDATE as theDate, startDate, TO_CHAR(startdate, '­MM­DD HH24:MI:SS') as maskedDate Data formating is not the job of the database. Return a proper date, and format

Re: cfquery: quotes vs queryparam

2007-08-09 Thread Jochem van Dieten
Gaulin, Mark wrote: Hi Dave You could look at cfqueryparam as providing lots of features (security, type and length checking, handling of lists, etc) without ever knowing that the implementation was done via parameter binding. Because all of those features could be implemented without

Re: cfquery: quotes vs queryparam

2007-08-09 Thread Jochem van Dieten
perfect security the way that a bound parameter would. Do you have any idea how difficult? We have 3 options in JDBC, Statement, PreparedStatement and CallableStatement. They currently map exactly to cfquery, cfqueryparam and cfstopredproc. So what you are proposing will in the end boil down

Re: cfquery: quotes vs queryparam

2007-08-09 Thread Tom Chiverton
On Wednesday 08 Aug 2007, [EMAIL PROTECTED] wrote: ALWAYS use cfqueryparam, or clean the crap out of any incoming variables to ensure they are not being exploited. No 'or' about it. Esp. now CF8 lets you have CF cache queryparam'ed cfquerys. -- Tom Chiverton

RE: cfquery: quotes vs queryparam

2007-08-09 Thread Gaulin, Mark
: RE: cfquery: quotes vs queryparam That seems like a lame argument to me. If you want to stick to defining cfqueryparam that way then I might as well request a new tag, cfqueryparmthatdoesntusebinding, that does everything that I want it to do without doing parameter binding. Then we could

RE: cfquery: quotes vs queryparam

2007-08-09 Thread Dave Watts
Yes! I want an off switch so when debugging is more important than security, I can do that without changing any code! OK, I can see potential value there, although I haven't felt the need for that myself. You two are really stuck on your positions and I'm only saying that more flexibility

Re: cfquery: quotes vs queryparam

2007-08-09 Thread Jochem van Dieten
Gaulin, Mark wrote: Dave wrote: But what exactly would this tag do, if not create a bound parameter? It sounds like what you really want is an off switch. Yes! I want an off switch so when debugging is more important than security, I can do that without changing any code! And how long will

RE: cfquery: quotes vs queryparam

2007-08-09 Thread Gaulin, Mark
on that request I will move along to other topics. Thanks Mark -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: Thursday, August 09, 2007 3:57 PM To: CF-Talk Subject: Re: cfquery: quotes vs queryparam Gaulin, Mark wrote: Dave wrote: But what exactly would this tag

cfquery: quotes vs queryparam

2007-08-08 Thread Rick Schmitty
Is there anyway for someone to hack a quoted query? cfquery select * from table where name='#form.lastname#' /cfquery vs cfquery select * from table where name=cfqueryparam cfsqltype=cf_sql_varchar maxlength=255 value=#form.lastname#/ /cfquery Seems anything I throw at the quoted query gets

Re: cfquery: quotes vs queryparam

2007-08-08 Thread Jochem van Dieten
Rick Schmitty wrote: Is there anyway for someone to hack a quoted query? cfquery select * from table where name='#form.lastname#' /cfquery Depends on the database and the configuration. Seems anything I throw at the quoted query gets escaped correctly... Have you played with characters

RE: cfquery: quotes vs queryparam

2007-08-08 Thread Peterson, Chris
of any incoming variables to ensure they are not being exploited. Chris Peterson Gainey IT Adobe Certified Advanced Coldfusion Developer -Original Message- From: Rick Schmitty [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 08, 2007 2:57 PM To: CF-Talk Subject: cfquery: quotes vs

Re: cfquery: quotes vs queryparam

2007-08-08 Thread Bryan Stevenson
Have you played with characters your database considers escape characters? Do you know which characters that are? Do you know which characters that will be for every database your application will ever run on? Have you played with characters CF does not consider escape characters because CF

RE: cfquery: quotes vs queryparam

2007-08-08 Thread Andy Matthews
Pete Freitag had an amazing session at CFUinted about things like this. It's amazing what can be done using the query string. -Original Message- From: Peterson, Chris [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 08, 2007 2:17 PM To: CF-Talk Subject: RE: cfquery: quotes vs

RE: cfquery: quotes vs queryparam

2007-08-08 Thread Justin Scott
Are you kidding??? I just replace form.lastname with:test'; DROP TABLE table; Poof, your data'z are gone ColdFusion would escape that single quote, rendering this attempt pretty much useless and data'z would still be there. I'm not suggesting that you shouldn't use CFQUERYPARAM wherever

RE: cfquery: quotes vs queryparam

2007-08-08 Thread Gaulin, Mark
I'm not seeing how your example would do anything other than find zero records... Start with: cfqueryselect from table where lastname = '#form.lastname#'/cfquery Use your example: Form.lastname = test'; DROP TABLE table; So you get (with quote-doubling) select from table where lastname

Re: cfquery: quotes vs queryparam

2007-08-08 Thread Rick Schmitty
an empty set with any injection attack I tried (using CF7 and MSSQL) Query 3 is obviously the wide open one cfparam name=url.name default=/ cfquery name=test1 datasource=pubs select * from dropme /cfquery cfdump var=#test1#/ cfquery name=test2 datasource=pubs select * from dropme where Lname

RE: cfquery: quotes vs queryparam

2007-08-08 Thread Bryan Stevenson
OKlet's all agree to disagree about added security from CFQUERYPARAM (even though it does add security...na na na boo boo) ;-) Just remember it also: -allows for additional maxlength validation (beyond your form inputs) -uses BIND vars with DBs that support them to speed up queries -adds

Re: cfquery: quotes vs queryparam

2007-08-08 Thread Ian Skinner
http://localhost/test.cfm?name=rick%20or%201=1 Was this an invitation to demonstrate techniques? If so, localhost ain't going to work for anybody else. If not, never mind. But I too would like to know more details about how this actually happens. I trust that I should use cfqueryparam...

Re: cfquery: quotes vs queryparam

2007-08-08 Thread Ian Skinner
but it isn't like cfquery without it is necessarily an open door (if you're consistent). Mark Well not that open, unless somebody has opened the door with preserveSingleQuotes() for some reason. But one would hope that this was done with a clear purpose and understanding of the risks

Re: cfquery: quotes vs queryparam

2007-08-08 Thread Ian Skinner
.just use the dang tag and it's all good ;-) Cheers I do, but that doesn't mean I don't want to know more how SQL injection actually works and how cfqueryparam... is mitigating this risk. Just to make myself a more knowledge person. No it has nothing to do with that site that fired me

RE: cfquery: quotes vs queryparam

2007-08-08 Thread Gaulin, Mark
(especially when!) it is wrong. Mark -Original Message- From: Bryan Stevenson [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 08, 2007 4:13 PM To: CF-Talk Subject: RE: cfquery: quotes vs queryparam OKlet's all agree to disagree about added security from CFQUERYPARAM (even

Re: cfquery: quotes vs queryparam

2007-08-08 Thread Rick Schmitty
Oh no, I agree (the null is my fav of cfqueryparam). This was just a case of inheriting a large pile of code w/o cfqueryparams and the guy used '#quotedvars#' for his strings (and IDs for the matter) and me wanting to feel better about not trying to convert it all over... :) On 8/8/07, Bryan

Re: cfquery: quotes vs queryparam

2007-08-08 Thread Jochem van Dieten
Gaulin, Mark wrote: I hear you, but cfqueryparm was historically not all good... It disables query caching via cachedwithin. This was always a frustrating limitation and my understanding is that is has been fixed in CF8 but I haven't played with cf8 yet to know for sure. It is. I wish CF

RE: cfquery: quotes vs queryparam

2007-08-08 Thread Dave Watts
I wish CF could allow the use of the cfqueryparam tag without all of the other side-effects (using binding, disabling caching) so that we really could say *always* use it... Binding is not a side-effect, it is exactly what CFQUERYPARAM does. CFQUERYPARAM creates bound parameters. Dave

RE: cfquery: quotes vs queryparam

2007-08-08 Thread Dave Watts
Are you kidding??? I just replace form.lastname with:test'; DROP TABLE table; Poof, your data'z are gone ColdFusion would escape that single quote, rendering this attempt pretty much useless and data'z would still be there. I'm not suggesting that you shouldn't use

Re: cfquery: quotes vs queryparam

2007-08-08 Thread Bryan Stevenson
I hear you, but cfqueryparm was historically not all good... It disables query caching via cachedwithin. This was always a frustrating limitation and my understanding is that is has been fixed in CF8 but I haven't played with cf8 yet to know for sure. Not once have I needed to cache a query

Re: cfquery: quotes vs queryparam

2007-08-08 Thread Jochem van Dieten
Bryan Stevenson wrote: Have you played with characters your database considers escape characters? Do you know which characters that are? Do you know which characters that will be for every database your application will ever run on? Have you played with characters CF does not consider escape

RE: cfquery: quotes vs queryparam

2007-08-08 Thread Gaulin, Mark
To: CF-Talk Subject: RE: cfquery: quotes vs queryparam I wish CF could allow the use of the cfqueryparam tag without all of the other side-effects (using binding, disabling caching) so that we really could say *always* use it... Binding is not a side-effect, it is exactly what CFQUERYPARAM does

RE: cfquery: quotes vs queryparam

2007-08-08 Thread Dave Watts
You could look at cfqueryparam as providing lots of features (security, type and length checking, handling of lists, etc) without ever knowing that the implementation was done via parameter binding. You could, but that's irrelevant; whether you know how something works has nothing to do

RE: cfquery: quotes vs queryparam

2007-08-08 Thread Gaulin, Mark
/8/2007 6:35 PM To: CF-Talk Subject: RE: cfquery: quotes vs queryparam You could look at cfqueryparam as providing lots of features (security, type and length checking, handling of lists, etc) without ever knowing that the implementation was done via parameter binding. You could, but that's

RE: cfquery: quotes vs queryparam

2007-08-08 Thread Dave Watts
That seems like a lame argument to me. If you want to stick to defining cfqueryparam that way then I might as well request a new tag, cfqueryparmthatdoesntusebinding, that does everything that I want it to do without doing parameter binding. Then we could both have our way but somehow

Re: cfquery: quotes vs queryparam

2007-08-08 Thread Dinner
But what exactly would this tag do, if not create a bound parameter? It sounds like what you really want is an off switch. Or, hey, crazy idea: Format the output so homecheese can read it! Actually, I bet that's doable, right now, if you mess with stuff, since I'm pretty sure that all the

RE: cfquery error, help please.

2007-08-01 Thread Chad Gray
, 2007 1:17 PM To: CF-Talk Subject: cfquery error, help please. What's wrong with my SQL statement? cfquery dbtype=query name=calander SELECT LEFT(filename,3) as mnth, filename FROM dir_data where filename like '%calendar%' /cfquery This the LEFT is causing an error. Anyone know what might

cfquery error, help please.

2007-08-01 Thread Dae
What's wrong with my SQL statement? cfquery dbtype=query name=calander SELECT LEFT(filename,3) as mnth, filename FROM dir_data where filename like '%calendar%' /cfquery This the LEFT is causing an error. Anyone know what might be the fix or problem? The error itself is: *Query Of Queries

Re: cfquery error, help please.

2007-08-01 Thread Dae
you output your data. -Original Message- From: Dae [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 01, 2007 1:17 PM To: CF-Talk Subject: cfquery error, help please. What's wrong with my SQL statement? cfquery dbtype=query name=calander SELECT LEFT(filename,3) as mnth, filename

RE: cfquery error, help please.

2007-08-01 Thread Brad Wood
, 2007 12:17 PM To: CF-Talk Subject: cfquery error, help please. What's wrong with my SQL statement? cfquery dbtype=query name=calander SELECT LEFT(filename,3) as mnth, filename FROM dir_data where filename like '%calendar%' /cfquery This the LEFT is causing an error. Anyone know what might

Re: cfquery error, help please.

2007-08-01 Thread Charlie Griefer
and use mid() ~Brad -Original Message- From: Dae [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 01, 2007 12:17 PM To: CF-Talk Subject: cfquery error, help please. What's wrong with my SQL statement? cfquery dbtype=query name=calander SELECT LEFT(filename,3) as mnth, filename

CFQUERY where id = #valuelist(values from form scope)#

2007-07-06 Thread coldfusion . developer
All, Within a CFQUERY Valuelist works well when working with the query scope, but when I try and pass it the form scope (FORM.variablename) tries to read it as a query. What can I use besides valuelist to parse this list? FORM.vote contains ids... 8,9,12,13,14 CFQUERY name=upd_vote_yes

Re: CFQUERY where id = #valuelist(values from form scope)#

2007-07-06 Thread Dominic Watson
CFQUERY name=upd_vote_yes datasource=#datasource# update dbo.tbl_contest_2007 SET cb_vote1 = 1 WHERE cbcont_id IN ('#Replace(FORM.vote,',',',','all)#') /CFQUERY Basically, each item in the list needs to be wrapped in single quotes. Dominic On 06/07/07, [EMAIL PROTECTED] [EMAIL

RE: CFQUERY where id = #valuelist(values from form scope)#

2007-07-06 Thread Aaron Wolfe
Use () instead of the '' and the query should work fine. -Aaron CFQUERY name=upd_vote_yes datasource=#datasource# update dbo.tbl_contest_2007 SET cb_vote1 = 1 WHERE cbcont_id IN (#FORM.vote#) /CFQUERY -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday

RE: CFQUERY where id = #valuelist(values from form scope)#

2007-07-06 Thread Marius Milosav
Use cfqueryparam CFQUERY name=upd_vote_yes datasource=#datasource# update dbo.tbl_contest_2007 SET cb_vote1 = 1 WHERE cbcont_id IN cfqueryparam cfsqltype=cf_sql_int list=yes value=#FORM.vote# /CFQUERY Marius Milosav ScorpioSoft Corp. www.scorpiosoft.com It's not about technology, it's about

RE: CFQUERY where id = #valuelist(values from form scope)#

2007-07-06 Thread Jake Churchill
Try this... CFQUERY name=upd_vote_yes datasource=#datasource# update dbo.tbl_contest_2007 SET cb_vote1 = 1 WHERE cbcont_id IN (cfqueryparam cfsqltype=cf_sql_integer value=#FORM.vote# list=true) /CFQUERY _ Jake Churchill CF Webtools 11204 Davenport, Ste. 200b

Re: CFQUERY where id = #valuelist(values from form scope)#

2007-07-06 Thread Christopher Jordan
How about: CFQUERY name=upd_vote_yes datasource=#datasource# update dbo.tbl_contest_2007 SET cb_vote1 = 1 WHERE cbcont_id IN (#ListQualify(Form.Vote,')#) /CFQUERY Cheers, Chris [EMAIL PROTECTED] wrote: All, Within a CFQUERY Valuelist works well when working with the query scope

Re: CFQUERY where id = #valuelist(values from form scope)#

2007-07-06 Thread J.J. Merrick
use cfqueryparam CFQUERY name=upd_vote_yes datasource=#datasource# update dbo.tbl_contest_2007 SET cb_vote1 = 1 WHERE cbcont_id IN (cfqueryparam value=#FORM.vote# list=yes cfsqltype=cf_sql_integer) /CFQUERY J.J. On 7/6/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: All, Within a CFQUERY

CFQuery and MySQL

2007-07-02 Thread Mark Leder
I have a new MySQL connection set up in CF7 - verifies correctly (called mysqldb). Within this connection I have a db called ABC, and then tables within this db. I can't get the cfquery to work correctly: If I use: cfquery name=insertA datasource=mysqldb I get the error: No database selected

Re: CFQuery and MySQL

2007-07-02 Thread Tom King
correctly (called mysqldb). Within this connection I have a db called ABC, and then tables within this db. I can't get the cfquery to work correctly: If I use: cfquery name=insertA datasource=mysqldb I get the error: No database selected If I use: cfquery name=insertA datasource

RE: CFQuery and MySQL

2007-07-02 Thread Mark Leder
That worked, thanks for clearing that up for me. -Original Message- From: Tom King [mailto:[EMAIL PROTECTED] Sent: Monday, July 02, 2007 8:40 AM To: CF-Talk Subject: Re: CFQuery and MySQL This may help with the set up (but I'm assuming as it verifies it probably ok): http

BUMP: Nested CFQuery calls - breaks why?

2007-06-14 Thread Ian Skinner
This is a follow up to my post on why one SQL statement works and another one did not. This issue seems to be that the main cfquery ... tag included a call to an UDF to create some of the values in the statement. Depending on the parameter passed into this UDF, it sometimes also made

How can I make cfquery stop removing leading 0's??

2007-04-29 Thread Will Tomlinson
I googled this and can't come up with a solution. I have an id field with a varchar datatype. I need to insert an id value into it. cfquery is removing my leading 0's. Is there a simple way to solve this without an ugly hack? Thanks, Will I removed the cfqueryparam to try and get ANYthing

Re: How can I make cfquery stop removing leading 0's??

2007-04-29 Thread Mark Mandel
. I have an id field with a varchar datatype. I need to insert an id value into it. cfquery is removing my leading 0's. Is there a simple way to solve this without an ugly hack? Thanks, Will I removed the cfqueryparam to try and get ANYthing to work. cfquery name=addinstructors

Re: How can I make cfquery stop removing leading 0's??

2007-04-29 Thread Will Tomlinson
Mark, just dumped the data and figured out Ben Nadel's excel CFC is removing the 0's for me. Thanks, Will ~| Create robust enterprise, web RIAs. Upgrade integrate Adobe Coldfusion MX7 with Flex 2

Re: How can I make cfquery stop removing leading 0's??

2007-04-29 Thread Will Tomlinson
Just figured out I have bad data to start with. lol... Will ~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 Flex 2 Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU Archive:

SQL DatePart function not working in cfquery...

2007-04-02 Thread Kevin Bales
I am trying to use the DatePart() function as part of a normal SQL query using Access DB. The SQL statement is formatted correctly to extract a month from a date field in the DB, and the SQL tests fine in Access. However, it does not work in cfquery. I then realized that CF uses the same

Re: SQL DatePart function not working in cfquery...

2007-04-02 Thread Charlie Griefer
in cfquery. I then realized that CF uses the same function as part of its own reserved function library. Looks and works pretty much the same as the SQL version, except the reference shows it primarily to format output of Date/Time and NOT used in SQL. I would like to use it to sort

Re: SQL DatePart function not working in cfquery...

2007-04-02 Thread Kevin Bales
if it's not in pound signs, CF won't think that it owns the function. can you paste the code you're using and specify how it does not work in cfquery? -- Charlie Griefer My SQL looks like this SELECT * FROM items WHERE DatePart(,itemDate)='1933' - Kevin

Re: SQL DatePart function not working in cfquery...

2007-04-02 Thread Charlie Griefer
On 4/2/07, Kevin Bales [EMAIL PROTECTED] wrote: if it's not in pound signs, CF won't think that it owns the function. can you paste the code you're using and specify how it does not work in cfquery? -- Charlie Griefer My SQL looks like this SELECT * FROM items WHERE DatePart

CFQUERY help

2007-03-25 Thread Eric Creese
Trying to run this but it keeps on failing.I got the right permissions because I can run this fine in SQL Query Analyzer. cfquery name=up datasource=#dbname# BULK INSERT stgContacts FROM 'C:\CFusionMX\wwwroot\ileaflet\clients\1\contacts.txt' WITH (FIELDTERMINATOR = '|') /cfquery

Re: CFQUERY vs SQL Server Stored Procedures

2007-03-23 Thread Robertson-Ravo, Neil (RX)
switchboard on +44 (0) 20 89107910. The opinions expressed within this communication are not necessarily those expressed by Reed Exhibitions. Visit our website at http://www.reedexpo.com -Original Message- From: Ryan, Terrence To: CF-Talk Sent: Fri Mar 23 02:13:36 2007 Subject: RE: CFQUERY

Re: CFQUERY vs SQL Server Stored Procedures

2007-03-23 Thread Teddy Payne
2007 Subject: RE: CFQUERY vs SQL Server Stored Procedures There are two reasons my organization encourages/forces all SQL to be in stored procedures. And they don't directly touch on performance. 1. A belief that keeping SQL code in the database is of itself a good thing. By keeping

Re: CFQUERY vs SQL Server Stored Procedures

2007-03-22 Thread simanonok
to retrieve the data of course). I'm thinking you might actually be asking about regular queries however. Some years ago I did a test to see how much difference sp's actually made. I constructed a couple of sp's to do lookups on large tables, compared their execution time with regular CFQUERY

RE: CFQUERY vs SQL Server Stored Procedures

2007-03-22 Thread Ryan, Terrence
There are two reasons my organization encourages/forces all SQL to be in stored procedures. And they don't directly touch on performance. 1. A belief that keeping SQL code in the database is of itself a good thing. By keeping the database interaction in the database you make it easier for DBA's

CFQUERY vs SQL Server Stored Procedures

2007-03-20 Thread coldfusion . developer
Opinions? Are cached queries as good as stored procedures? Technically which are better? Is it a significant difference? Thanks D ~| Create Web Applications With ColdFusion MX7 Flex 2. Build powerful, scalable RIAs. Free

RE: CFQUERY vs SQL Server Stored Procedures

2007-03-20 Thread Robertson-Ravo, Neil (RX)
It all depends on what you want to do. For startersCached Queries are good but you cannot use cfqueryparam, SPs can return multiple recordsets which cfquery cannot. In some cases it may be better to use cfquery and in some an SP. -Original Message- From: [EMAIL PROTECTED

RE: CFQUERY vs SQL Server Stored Procedures

2007-03-20 Thread Ian Skinner
Opinions? Are cached queries as good as stored procedures? Technically which are better? Is it a significant difference? Thanks If you are just using stored procedures to cache the data, it is probably a relatively even trade off. But, of course a stored procedure can do a lot more then just

Re: CFQUERY vs SQL Server Stored Procedures

2007-03-20 Thread coldfusion . developer
Thanks guys. I ijust found this article on Adobe.com that helped if anyone had similar questions to my original questions. http://www.adobe.com/devnet/coldfusion/articles/beg_storedproc.html D Opinions? Are cached queries as good as stored procedures? Technically which are better? Is it a

Using cfquery to select from multiple datasources

2007-03-18 Thread Kristin Collins
I need to write an sql statement within a cfquery tag that pulls from two seperate datasources. But it's coming back with Invalid object name Below is the what I have written: cfquery datasource=#request.dsn# name=towns SELECT townid as tid, town as cityname from towns where siteID = 1 union

Re: Using cfquery to select from multiple datasources

2007-03-18 Thread Jim Wright
Kristin Collins wrote: I need to write an sql statement within a cfquery tag that pulls from two seperate datasources. But it's coming back with Invalid object name Below is the what I have written: cfquery datasource=#request.dsn# name=towns SELECT townid as tid, town as cityname

Re: Using cfquery to select from multiple datasources

2007-03-18 Thread Kristin Collins
Kristin Collins wrote: Does the user that you are connecting to the request.dsn with have access to the compdb database? Are the two databases on the same server or are the servers linked? You said datasources in your message, and you can't query across CF datasources (except by combining

Re: cfstoredproc vs cfquery

2007-02-25 Thread Robertson-Ravo, Neil (RX)
Feb 24 22:46:09 2007 Subject: RE: cfstoredproc vs cfquery Thanks for your input, Dave. My concern is the processing overhead that is incurred by using CFSTOREDPROC. Do you know of any way to access multiple recordsets in CFQUERY? As it stands now, CFQUERY only returns the 1st recordset while

RE: cfstoredproc vs cfquery

2007-02-24 Thread Dave Watts
Thanks for your input, Dave. My concern is the processing overhead that is incurred by using CFSTOREDPROC. Do you know of any way to access multiple recordsets in CFQUERY? As it stands now, CFQUERY only returns the 1st recordset while ignoring the rest. The ability to pull multiple

Re: cfstoredproc vs cfquery

2007-02-23 Thread Sapporo Sapporo
Thanks for your input, Dave. My concern is the processing overhead that is incurred by using CFSTOREDPROC. Do you know of any way to access multiple recordsets in CFQUERY? As it stands now, CFQUERY only returns the 1st recordset while ignoring the rest. The ability to pull multiple recordsets

cfstoredproc vs cfquery

2007-02-22 Thread Bobby Hartsfield
Anyone know if there is an advantage either way when it comes to calling a stored procedure? Say I have a storedproc called GetAllResults. I can call it 2 ways. cfquery name=”myquery” datasource=”mydatasource” Execute GetAllResults /cfquery cfdump var=#myQuery

RE: cfstoredproc vs cfquery

2007-02-22 Thread Ian Skinner
The only one I can think of, but then I don't use SP's very often; IIRC is that the cfstoredProc tag can handle more complex procedures. -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA - | 1 | | - Binary Sudoku | | | -

RE: cfstoredproc vs cfquery

2007-02-22 Thread Bobby Hartsfield
None come to mind that can't be executed via cfquery. What do you mean by more complex? -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.441 / Virus Database: 268.18.3/697 - Release Date: 2/22/2007 11:55 AM

RE: cfstoredproc vs cfquery

2007-02-22 Thread Leitch, Oblio
PROTECTED] Sent: Thursday, February 22, 2007 11:31 AM To: CF-Talk Subject: RE: cfstoredproc vs cfquery None come to mind that can't be executed via cfquery. What do you mean by more complex? -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.441 / Virus Database

Cfquery timeout parameter.

2007-02-22 Thread Ian Skinner
Can somebody tell me exactly how this works? Reading the documentation I get this message. Timeout: Maximum number of seconds that each action of a query is permitted to execute before returning an error. The cumulative time may exceed this value. What exactly is an action in a query and if

RE: cfstoredproc vs cfquery

2007-02-22 Thread Dave Watts
and return parameters. The CFSTOREDPROC tag allows for all that. Also, you can't use CFQUERY on all platforms to execute stored procedures, as I recall. But if you don't have any of these issues there's nothing wrong with using CFQUERY instead, and there are some advantages, such as the ability to use

RE: Cfquery timeout parameter.

2007-02-22 Thread Ben Nadel
? www.bennadel.com/ask-ben/ -Original Message- From: Ian Skinner [mailto:[EMAIL PROTECTED] Sent: Thursday, February 22, 2007 12:38 PM To: CF-Talk Subject: Cfquery timeout parameter. Can somebody tell me exactly how this works? Reading the documentation I get this message. Timeout: Maximum

RE: Cfquery timeout parameter.

2007-02-22 Thread Ian Skinner
I guess it means the execution of a single: UPDATE SELECT DELETE Would this also apply to sub-selects and other more comlex SQL syntax? Say: SELECT aField FROM (SELECT bField FROM bTable) aTable Would that be two actions? Each one allowed to run for the timeout period, or if the inner select

RE: Cfquery timeout parameter.

2007-02-22 Thread Ben Nadel
] Sent: Thursday, February 22, 2007 12:52 PM To: CF-Talk Subject: RE: Cfquery timeout parameter. I guess it means the execution of a single: UPDATE SELECT DELETE Would this also apply to sub-selects and other more comlex SQL syntax? Say: SELECT aField FROM (SELECT bField FROM bTable) aTable

RE: cfstoredproc vs cfquery

2007-02-22 Thread Jeffrey Polaski
specificity with regards to permissions and accessing other databases. CFQuery is more flexible -- you can just type in the SQL you want to run. Cfstoredproc requires you to create and modify stored procedures in the db. It's not a big deal, but it's kind of a pain when you are developing an app

RE: cfstoredproc vs cfquery

2007-02-22 Thread Ian Skinner
I've found that they work really well together. I generally develop an app with cfquery, and change them all to cfstoredproc before I put it into production. I just want to point out that the topic of this thread is that one can CALL simple stored procedures with cfquery... tags, so what

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