RE: CFQUERYPARAM, Numerics and Nulls

2005-03-30 Thread Dave Watts
So Davewhat you've said looks like it will pass a NULL if the expression evaluates to YES and will pass the correct value if the expression evaluates to NO?? Yes. Dave Carabetta's example is pretty typical of what this usually looks like. Dave Watts, CTO, Fig Leaf Software

Re: CFQUERYPARAM, Numerics and Nulls

2005-03-30 Thread Phillip Duba
Thanks for the info guys. That wasn't how I expected the attribute to work based on reading the documentation. Anyway, here is my cfqueryparam now for those who might still be confused: CFQUERYPARAM value=#theQuery.numberColumn# cfsqltype=CF_SQL_NUMERIC null=#NOT IsNumeric

Re: CFQUERYPARAM, Numerics and Nulls

2005-03-30 Thread Bryan Stevenson
Thanks Dave(s) ;-) It just never occurred to me to use an expression as the NULL attribute valuebut now the light has come on...and I must say...DOH! shoulda seen that years ago ;-) Cheers Bryan Stevenson B.Comm. VP Director of E-Commerce Development Electric Edge Systems Group Inc.

RE: CFQUERYPARAM, Numerics and Nulls

2005-03-30 Thread Damien McKenna
-Original Message- It just never occurred to me to use an expression as the NULL attribute valuebut now the light has come on...and I must say...DOH! shoulda seen that years ago ;-) That's definitely a major METOO. cfsmack type=forhead / -- Damien McKenna - Web Developer -

Re: CFQUERYPARAM, Numerics and Nulls

2005-03-30 Thread Matt Robertson
CFQUERYPARAM value=#theQuery.numberColumn# cfsqltype=CF_SQL_NUMERIC null=#NOT IsNumeric(theQuery.numberColumn)#) Talk about a smack on the head... I've always used len(trim(foo)), but isnumeric is a little tighter. Never thought of that. It also covers the issue of the field value itself, so

CFQUERYPARAM and NVarChar datatypes

2005-03-29 Thread Phillip Duba
I have a number of tables in a SQL Server database that have the NVarchar datatype. I want to use CFQUERYPARAM in my insert and updates to these columns but also want to support the Unicode functionality. How is this done? I know if I insert without CFQUERYPARAM, place an 'N' prior to the text

Re: CFQUERYPARAM and NVarChar datatypes

2005-03-29 Thread S . Isaac Dealey
I have a number of tables in a SQL Server database that have the NVarchar datatype. I want to use CFQUERYPARAM in my insert and updates to these columns but also want to support the Unicode functionality. How is this done? I know if I insert without CFQUERYPARAM, place an 'N' prior

Re: CFQUERYPARAM and NVarChar datatypes

2005-03-29 Thread Paul Hastings
S. Isaac Dealey wrote: cfqueryparam handles it for you... provided you turn on the unicode option for that DSN. blogged about in boring detail: http://www.sustainablegis.com/blog/cfg11n/index.cfm?mode=entryentry=F9553D86-20ED-7DEE-2A913AFD8651643F want to set the form and url scopes to UTF-8

cfqueryparam caching data

2005-03-25 Thread Adrian Lynch
I have a query that returns one row from the DB which uses cfqueryparam. I'd heard about a problem with caching so after a puzzling 30 seconds asking myself where my new column had gone I thought I'd remove the cfqp which worked. Now when I put it back in I still get the cached data. So

RE: cfqueryparam caching data

2005-03-25 Thread Adrian Lynch
DBCC DROPCLEANBUFFERS looked like it might be the one but still no luck. Ade -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: 25 March 2005 21:00 To: CF-Talk Subject: cfqueryparam caching data I have a query that returns one row from the DB which uses cfqueryparam

RE: cfqueryparam caching data

2005-03-25 Thread Dave Watts
I have a query that returns one row from the DB which uses cfqueryparam. I'd heard about a problem with caching so after a puzzling 30 seconds asking myself where my new column had gone I thought I'd remove the cfqp which worked. Now when I put it back in I still get the cached data

RE: cfqueryparam caching data

2005-03-25 Thread Ryan Duckworth
Communications 10983 Granada Lane Overland Park, KS 66211 (913) 754-4272 -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: Friday, March 25, 2005 3:16 PM To: CF-Talk Subject: RE: cfqueryparam caching data I have a query that returns one row from the DB which uses

RE: cfqueryparam caching data

2005-03-25 Thread Adrian Lynch
. Ade -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: 25 March 2005 21:16 To: CF-Talk Subject: RE: cfqueryparam caching data I'm not sure it's the CFQUERYPARAM which is causing the problem. Conceivably, you could have the same problem if you had a hardcoded value in your

RE: cfqueryparam caching data

2005-03-25 Thread Dave Watts
I am using SELECT * and changing it to a listing of the columns(changing the statement) has caused it to refresh. But going back to SELECT * still gets the cached data. Here is my understanding of what happens. If you use SELECT *, the database will have to resolve what * is, before it

Re: cfqueryparam question

2005-03-22 Thread Scott Brady
On Sun, 13 Mar 2005 11:06:58 -0500, S. Isaac Dealey wrote: specifically I believe cfsqltype=cf_sql_longvarchar CF_SQL_CLOB is an undocumented type that is, I believe, more specifically designed for the text field, though longvarchar also works. I'm not sure if there's a significant difference

Re: cfqueryparam question

2005-03-22 Thread Aaron Rouse
I believe with Oracle in later than CF5 you could insert/update more than 4000 characters into a clob when using CF_SQL_CLOB. Not sure for CF5 though, for some reason I recall it failing beyond 4000 and requiring work arounds. On Tue, 22 Mar 2005 10:44:53 -0700, Scott Brady [EMAIL PROTECTED]

RE: cfqueryparam breaking query

2005-03-16 Thread Dawson, Michael
see much difference unless you are in the hundreds of thousands of records or in really large tables. M!ke -Original Message- From: Taco Fleur [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 11:39 PM To: CF-Talk Subject: RE: cfqueryparam breaking query CHAR is a fixed width

Re: cfqueryparam breaking query

2005-03-16 Thread Jochem van Dieten
Dawson, Michael wrote: Correct me if I'm wrong but aren't var*** type fields also just pointers to another location? No, usually they are stored inline. As you said, char(34) means set aside 34 chars and pad the the field if not all 34 chars are used. While CHAR fields may have a fixed

cfqueryparam breaking query

2005-03-15 Thread Ron G
I have an Access 97 database(Yes I Know) that has a linked Oracle table\view in it. I can query the linked table without cfqueryparam. This Works: SELECT [LAWSON_SHC_EMPLOYEE_V].[LAST_NAME] FROM LAWSON_SHC_EMPLOYEE_V WHERE LAWSON_SHC_EMPLOYEE_V.LAST_NAME= '#ucase

cfqueryparam breaking query

2005-03-15 Thread Ron G
I ahve an Access 97 database(Yes I Know) that has a linked Oracle table\view in it. I can query the linked table without cfqueryparam. This Works: SELECT [LAWSON_SHC_EMPLOYEE_V].[LAST_NAME] FROM LAWSON_SHC_EMPLOYEE_V WHERE LAWSON_SHC_EMPLOYEE_V.LAST_NAME= '#ucase

Re: cfqueryparam breaking query

2005-03-15 Thread Sean Corfield
On Tue, 15 Mar 2005 19:19:49 -0400, Ron G [EMAIL PROTECTED] wrote: I have an Access 97 database(Yes I Know) that has a linked Oracle table\view in it. I can query the linked table without cfqueryparam. LAWSON_SHC_EMPLOYEE_V.LAST_NAME= cfqueryparam value=#ucase(form.Lname

Re: cfqueryparam breaking query

2005-03-15 Thread Tyler Fitch
PROTECTED] wrote: On Tue, 15 Mar 2005 19:19:49 -0400, Ron G [EMAIL PROTECTED] wrote: I have an Access 97 database(Yes I Know) that has a linked Oracle table\view in it. I can query the linked table without cfqueryparam. LAWSON_SHC_EMPLOYEE_V.LAST_NAME= cfqueryparam value

Re: cfqueryparam breaking query

2005-03-15 Thread Sean Corfield
On Tue, 15 Mar 2005 17:11:11 -0800, Tyler Fitch [EMAIL PROTECTED] wrote: I don't know what Ron's problem is, but cf_sql_char isn't limited to a single char. Sean, you thought wrong ;). It's the same thing as a CHAR datatype in a RDBMS. I use cf_sql_char with a size=35 for my UUID

RE: cfqueryparam breaking query

2005-03-15 Thread Taco Fleur
PROTECTED] Sent: Wednesday, 16 March 2005 11:11 AM To: CF-Talk Subject: Re: cfqueryparam breaking query I don't know what Ron's problem is, but cf_sql_char isn't limited to a single char. Sean, you thought wrong ;). It's the same thing as a CHAR datatype in a RDBMS. I use cf_sql_char with a size=35

RE: cfqueryparam breaking query

2005-03-15 Thread Taco Fleur
-Talk Subject: RE: cfqueryparam breaking query CHAR is a fixed width datatype If you have a field with CHAR( 34 ) and you only insert 4 characters than the other 30 characters are padded with a space. -- Taco Fleur Senior Web Systems Engineer http://www.webassociates.com -Original Message

cfqueryparam question

2005-03-13 Thread Dave Francis
Brain-dead. What's the cfqueryparam cfsqltype for a text column? - SQL Server 2k. CF5.0 ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent

RE: cfqueryparam question

2005-03-13 Thread Adrian Lynch
Long varchar Ade -Original Message- From: Dave Francis [mailto:[EMAIL PROTECTED] Sent: 13 March 2005 12:50 To: CF-Talk Subject: cfqueryparam question Brain-dead. What's the cfqueryparam cfsqltype for a text column? - SQL Server 2k. CF5.0 -- No virus found in this outgoing message

RE: cfqueryparam question

2005-03-13 Thread S . Isaac Dealey
specifically I believe cfsqltype=cf_sql_longvarchar Long varchar Ade -Original Message- From: Dave Francis [mailto:[EMAIL PROTECTED] Sent: 13 March 2005 12:50 To: CF-Talk Subject: cfqueryparam question Brain-dead. What's the cfqueryparam cfsqltype for a text column? - SQL

Re: Sidestep to cfqueryparam

2005-02-18 Thread Matt Robertson
. As in cfqueryparam cfsqltype=CF_SQL_VARCHAR value=#form.SubFilter# null=#YesNoFormat(not Len(form.SubFilter))# -- --mattRobertson-- Janitor, MSB Web Systems mysecretbase.com ~| Discover CFTicket - The leading

Re: Sidestep to cfqueryparam

2005-02-18 Thread Adrocknaphobia
, but I will force myself using cfqueryparam purely because I am ignorant compared to fulltime hackers. I don't play Russian roulette with the millions of email addresses I might have in the database. I personally would have preferred some shorthand mode for the tag, but until that becomes available

Re: Sidestep to cfqueryparam

2005-02-18 Thread Barney Boisvert
To rephrase this the right way: If you're concerned about database security, you should lock down CF's user account(s) so it can only execute specific stored procs, and is unable to run arbitrary queries. cheers, barneyb On Fri, 18 Feb 2005 16:22:06 -0500, Adrocknaphobia [EMAIL PROTECTED]

jwz on Groupware + one good reason to use cfqueryparam [was Re: Internet Explorer 7 (no really!)]

2005-02-17 Thread Keith Gaughan
the horses (jwz's) pen this morning: http://www.jwz.org/doc/groupware.html Now for that Obligatory ColdFusion Bit: Even if you think CF will protect you from SQL injection attacks without needing to use cfqueryparam, there's one good reason for using it: lists. Writing queries against lists

RE: jwz on Groupware + one good reason to use cfqueryparam [was R e: Internet Explorer 7 (no really!)]

2005-02-17 Thread Dave Watts
Even if you think CF will protect you from SQL injection attacks without needing to use cfqueryparam, there's one good reason for using it: lists. ... Now imagine if the list was a bunch of strings, say email addresses. Now that's even more annoying because you have to loop over all

Re: jwz on Groupware + one good reason to use cfqueryparam [was R e: Internet Explorer 7 (no really!)]

2005-02-17 Thread Keith Gaughan
Dave Watts wrote: I'm a big fan of CFQUERYPARAM, As any right-thinking person would be. but this is a bad example to justify its use. You don't need to do all that work. There's a function called ListQualify that takes care of this for you: Forgot about that one! Cheers! cfquery name

RE: jwz on Groupware + one good reason to use cfqueryparam [was R e: Internet Explorer 7 (no really!)]

2005-02-17 Thread Dave Watts
always worked, before there even was a CFQUERYPARAM tag. Anyway, the main thrust of my code was to say that cfqueryparam made the type of the list unimportant. It just makes inserting lists into queries a bit easier. Again, though, it doesn't. I'm not trying to be annoying about

cfqueryparam and performance

2005-02-17 Thread Rick Root
I always thought of cfqueryparam as primarily a security tag to help avoid SQL injection. Honestly, I now think that's really a secondary purpose. It's all about performance! We have a table with email addresses for some 80,000 alumni here at Duke. When I do an email search without using

Re: cfqueryparam and performance

2005-02-17 Thread Keith Gaughan
Rick Root wrote: I always thought of cfqueryparam as primarily a security tag to help avoid SQL injection. Honestly, I now think that's really a secondary purpose. It's all about performance! We have a table with email addresses for some 80,000 alumni here at Duke. When I do an email

Sidestep to cfqueryparam

2005-02-17 Thread Micha Schopman
friendly people? I admit, I don't like the tag syntax at all, but I will force myself using cfqueryparam purely because I am ignorant compared to fulltime hackers. I don't play Russian roulette with the millions of email addresses I might have in the database. I personally would have preferred some

RE: CFQUERYPARAM in CFC?

2005-02-16 Thread Calvin Ward
I'm thinking that's over the top. The only crazy question is the one that's never asked. - Calvin -Original Message- From: Tyler Fitch [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 1:31 PM To: CF-Talk Subject: Re: CFQUERYPARAM in CFC? Holy crap. That's an amazing thing

RE: CFQUERYPARAM in CFC?

2005-02-16 Thread James Holmes
I suspect Mike was trolling in his own forum... ;-) -Original Message- From: Calvin Ward [mailto:[EMAIL PROTECTED] Sent: Wednesday, 16 February 2005 7:26 To: CF-Talk Subject: RE: CFQUERYPARAM in CFC? I'm thinking that's over the top. The only crazy question is the one that's never

RE: CFQUERYPARAM in CFC?

2005-02-16 Thread Calvin Ward
What?!?!? Don't feed the trolls! :P - Calvin -Original Message- From: James Holmes [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 16, 2005 6:29 AM To: CF-Talk Subject: RE: CFQUERYPARAM in CFC? I suspect Mike was trolling in his own forum... ;-) -Original Message- From

Re: CFQUERYPARAM in CFC?

2005-02-16 Thread Tyler Fitch
of the mighty cfqueryparam. Cheers, t On Wed, 16 Feb 2005 06:26:08 -0500, Calvin Ward [EMAIL PROTECTED] wrote: I'm thinking that's over the top. The only crazy question is the one that's never asked. - Calvin -Original Message- From: Tyler Fitch [mailto:[EMAIL PROTECTED] Sent

CFQUERYPARAM in CFC?

2005-02-15 Thread Michael Dinowitz
Personally, I see no reason for a CFQUERYPARAM being used inside a CFC. It adds extra overhead and the protection that it provides should be provided instead by the CFARGUMENT tag. Does anyone see a reason for it in such a case? Data binding

RE: CFQUERYPARAM in CFC?

2005-02-15 Thread Bryan F. Hogan
Subject: CFQUERYPARAM in CFC? Personally, I see no reason for a CFQUERYPARAM being used inside a CFC. It adds extra overhead and the protection that it provides should be provided instead by the CFARGUMENT tag. Does anyone see a reason for it in such a case? Data binding

RE: CFQUERYPARAM in CFC?

2005-02-15 Thread Matthew Small
Couldn't you still pass SQL injection strings into a string parameter of a CFC? - Matt Small -Original Message- From: Michael Dinowitz [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 12:26 PM To: CF-Talk Subject: CFQUERYPARAM in CFC? Personally, I see no reason

Re: CFQUERYPARAM in CFC?

2005-02-15 Thread Tyler Fitch
Holy crap. That's an amazing thing to say. CFARGUMENT doesn't filter SQL Injection attacks. I can't see a single reason for such a case. That's crazy talk. t On Tue, 15 Feb 2005 13:26:10 -0400, Michael Dinowitz [EMAIL PROTECTED] wrote: Personally, I see no reason for a CFQUERYPARAM being

RE: CFQUERYPARAM in CFC?

2005-02-15 Thread Ben Rogers
Personally, I see no reason for a CFQUERYPARAM being used inside a CFC. It adds extra overhead and the protection that it provides should be provided instead by the CFARGUMENT tag. Does anyone see a reason for it in such a case? Data binding? Besides the fact that security should be performed

RE: CFQUERYPARAM in CFC?

2005-02-15 Thread Michael T. Tangorre
From: Michael Dinowitz [mailto:[EMAIL PROTECTED] Personally, I see no reason for a CFQUERYPARAM being used inside a CFC. It adds extra overhead and the protection that it provides should be provided instead by the CFARGUMENT tag. Does anyone see a reason for it in such a case? Data

RE: CFQUERYPARAM in CFC?

2005-02-15 Thread Dave Watts
Personally, I see no reason for a CFQUERYPARAM being used inside a CFC. It adds extra overhead and the protection that it provides should be provided instead by the CFARGUMENT tag. Does anyone see a reason for it in such a case? Data binding? How exactly would you provide the requisite

RE: CFQUERYPARAM in CFC?

2005-02-15 Thread RADEMAKERS Tanguy
If your backend database supports it, then CFQUERYPARAM implements bind variables for your query. Consider: select * from emp where id = #variable# if you execute this for employee 1, 2, 3, etc, then: - without bind variables, the db will reparse the statement each and every time, because

Re: CFQUERYPARAM in CFC?

2005-02-15 Thread Nathan Strutz
You typically won't see any cfqueryparam performance gains on low-usage queries and servers. In these cases, the reason for using them is typically security, standardization and best practices. Under heavy loads, cfqueryparam (sql bind variables actually) can help your database cache queries

RE: CFQUERYPARAM in CFC?

2005-02-15 Thread RADEMAKERS Tanguy
cfset midtime = Now() cfloop index=i from=1 to=1000 step=1 cfquery name=TestQuery2 datasource=#sc_datasource# Select object_name from all_objects where object_id = cfqueryparam value=#i# cfsqltype=CF_SQL_INTEGER /cfquery /cfloop cfset endtime = Now() cfoutput starttime: #starttime

Re: CFQUERYPARAM in CFC?

2005-02-15 Thread Joe Rinehart
Hey Mike, For security, CFQueryparam interacts with the database driver, telling it that the value provided is only a value and not SQL code - without it, a string arg could still contain injection code For performance, bind queries can be cached by some RDBMS platforms providing a performance

Re: CFQUERYPARAM in CFC?

2005-02-15 Thread Michael Dinowitz
Thank you all for bringing out the arguments for the use of CFQUERYPARAM for everyone to read. I expect that this will motivate many here to start using the tag, now that they see it's use. One thing not mentioned is that the tag can not be used along with cached queries using CachedWithin

CFQUERYPARAM data checking

2005-02-14 Thread Jim McAtee
When a cfqueryparam tag is executed, does CF do any type of bounds checking on numeric values? (CF 5) For instance, if I'm inserting a longint into a table, with the following code would CF throw an error if the value of the id were greater than some integer value? cfqueryparam cfsqltype

Re: CFQUERYPARAM data checking

2005-02-14 Thread Barney Boisvert
I'm pretty sure it just does type checking, not bound checking. The exception would be the maxlength attribute for string lengths. cheers, barneyb On Mon, 14 Feb 2005 16:57:17 -0700, Jim McAtee [EMAIL PROTECTED] wrote: When a cfqueryparam tag is executed, does CF do any type of bounds

Re: CFQUERYPARAM data checking

2005-02-14 Thread Jim McAtee
Then what's the reason behind all the possible values (data types) for the cfsqltype attribute? - Original Message - From: Barney Boisvert [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Monday, February 14, 2005 5:04 PM Subject: Re: CFQUERYPARAM data checking I'm

Re: CFQUERYPARAM data checking

2005-02-14 Thread Jochem van Dieten
Jim McAtee wrote: When a cfqueryparam tag is executed, does CF do any type of bounds checking on numeric values? (CF 5) It tries to cast it to a certain type in the driver and throws an error if that fails. Jochem

Re: CFQUERYPARAM data checking

2005-02-14 Thread Jim McAtee
CF differentiate between the different drivers, or does it treat all of them the same? - Original Message - From: Jochem van Dieten [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Monday, February 14, 2005 5:44 PM Subject: Re: CFQUERYPARAM data checking Jim McAtee wrote

Re: CFQUERYPARAM data checking

2005-02-14 Thread Sean Corfield
On Mon, 14 Feb 2005 17:57:14 -0700, Jim McAtee [EMAIL PROTECTED] wrote: Are the actual definitions of smallint, integer, bigint, etc. fixed (no indication of this in the CF5 help) or are they dependant upon the DBMS driver? What about for ODBC datasources - does CF differentiate between the

CFQUERYPARAM question

2005-02-07 Thread Claude Schneegans
Hi, I'm not too sure I accurately understand the role of attribute null in the CFQUERYPARAM tag. Does it mean that if it is YES, when the VALUE attribute is empty, the query will use NULL instead of the empty string? For instance, these two quries are about the same? INSERT INTO Clients

Re: CFQUERYPARAM question

2005-02-07 Thread Barney Boisvert
If the NULL atributes is set to true, then NULL will be passed to the database. If the NULL attributes is set to false (or omitted), then the value of the VALUE attribute will be passed to the database. Here's a 'typical' usage: cfqueryparam cfsqltype=cf_sql_integer value=#form.myNumberField

RE: CFQUERYPARAM question

2005-02-07 Thread Dave Watts
I'm not too sure I accurately understand the role of attribute null in the CFQUERYPARAM tag. Does it mean that if it is YES, when the VALUE attribute is empty, the query will use NULL instead of the empty string? Yes. You can use inline conditional logic to determine whether to specify

Re: CFQUERYPARAM question

2005-02-07 Thread Claude Schneegans
That'll pass the number in the database, unless the value isn't numeric, in which case it will pass NULL. Do you mean that if NULL=yes null will be passed to the database, even if the VALUE attributes contains a valid value ? -- ___ REUSE CODE! Use custom

RE: CFQUERYPARAM question

2005-02-07 Thread Dave Watts
Do you mean that if NULL=yes null will be passed to the database, even if the VALUE attributes contains a valid value? Yes, that is correct. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our

Re: CFQUERYPARAM question

2005-02-07 Thread Claude Schneegans
Yes, that is correct. Ok, I understand, the null must be specify by program, because CFQUERYPARAM has no way to distinguish an empty string from a true null. Thanks. -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags

SOT: PostgreSQL problem and cfqueryparam

2005-02-01 Thread Rick Root
I'm having a strange issue with postgresql... I have a database table containing a field defined as follows: ABSTRACT text not null default '' When I insert data, I use cfqueryparam as follows: cfqueryparam cfsqltype=cf_sql_longvarchar value=#arguments.details.abstract# And I'm seeing

Re: SOT: PostgreSQL problem and cfqueryparam

2005-02-01 Thread Jochem van Dieten
Rick Root wrote: I'm having a strange issue with postgresql... I have a database table containing a field defined as follows: ABSTRACT text not null default '' What is the function of DEFAULT ''? When I insert data, I use cfqueryparam as follows: cfqueryparam cfsqltype

Re: SOT: PostgreSQL problem and cfqueryparam

2005-02-01 Thread Rick Root
=tn_18338 I would think that cfqueryparam would be sending an empty string, not a null... I would think the PostgreSQL ODBC driver doesn't know the difference. I can't force all users of my application to use JDBC. I can't imagine that many hosting providers would say Sure, I'll install

Re: SOT: PostgreSQL problem and cfqueryparam

2005-02-01 Thread Jochem van Dieten
Rick Root wrote: Jochem van Dieten wrote: ABSTRACT text not null default '' What is the function of DEFAULT ''? It's a simple and common option that assigns a default value upon INSERT if the field is not included. But why is that better then just inserting a NULL? I can't force

Re: SOT: PostgreSQL problem and cfqueryparam

2005-02-01 Thread Rick Root
Jochem van Dieten wrote: But why is that better then just inserting a NULL? It guarantees that I don't ever have to worry about null values, I guess. Though I never realized that oracle didn't know the difference between null and an empty string. I can't imagine any hosting provider

RE: PostgreSQL problem and cfqueryparam

2005-02-01 Thread Mike Nicholls
That is pretty strange - does setting the null attribute on the cfqueryparam help? cfqueryparam cfsqltype=cf_sql_longvarchar value=#arguments.details.abstract# null=No From that error message it looks like you're going through the SequeLink drivers - you might want to try using the PostgreSQL

cfqueryparam help

2005-01-25 Thread daniel kessler
I have a WHERE statement that I'm building, but I am having trouble adding cfqueryparam to the agency field. This is Oracle and the agency field is a varchar2(100). While I've simplified the query for the posting, it gives displays the problem. SELECT * FROM internships WHERE 1=1 cfif

Re: cfqueryparam help

2005-01-25 Thread daniel kessler
sorry it posted a bunch of times. I only clicked once so I don't know why it did it, but sorry anyway. Hope this doesn't reply 5 times. ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application

Re: cfqueryparam help

2005-01-25 Thread Aaron Rouse
Try, LIKE cfqueryparam value=%#UCase(Form.Agency)#% cfsqltype=cf_sql_varchar On Tue, 25 Jan 2005 15:31:16 -0400, daniel kessler [EMAIL PROTECTED] wrote: sorry it posted a bunch of times. I only clicked once so I don't know why it did it, but sorry anyway. Hope this doesn't reply 5 times

Re: cfqueryparam help

2005-01-25 Thread daniel kessler
Try, LIKE cfqueryparam value=%#UCase(Form.Agency)#% cfsqltype=cf_sql_varchar ah that makes sense, thanks. I have a followup question. I changed UPPER to UCase in the next line and received an error, UCase:invalid identifier, but it works fine with Agency in the line above and with UPPER

RE: cfqueryparam help

2005-01-25 Thread Ian Skinner
query line: cfif Form.agency neq AND UCase(agency) LIKE cfqueryparam value=%#UCase(Form.Agency)#% cfsqltype=cf_sql_varchar /cfif cfif Form.city neq AND UCase(city) LIKE cfqueryparam value=%#UCase(Form.city)#% cfsqltype=cf_sql_varchar /cfif On the left side of the LIKE operator you

Re: cfqueryparam help

2005-01-25 Thread Aaron Rouse
That is because UCase() is a CF function and not an Oracle function. On Tue, 25 Jan 2005 17:17:11 -0400, daniel kessler [EMAIL PROTECTED] wrote: Try, LIKE cfqueryparam value=%#UCase(Form.Agency)#% cfsqltype=cf_sql_varchar ah that makes sense, thanks. I have a followup question. I

Re: cfqueryparam help

2005-01-25 Thread daniel kessler
That is because UCase() is a CF function and not an Oracle function. Oops. Thanks. ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application

RE: Cachedwithin + CFQUERYPARAM

2005-01-14 Thread COLLIE David
Thanks for the clarification Jochem, I thought it was a database issue! variables is impossible. The only thing you need to make sure is that you don't just use the query string and name as keys, but the bind variables as well. Sorry, I'm not sure what you mean here though (may be too

Re: Cachedwithin + CFQUERYPARAM

2005-01-14 Thread COLLIE David
variables is impossible. The only thing you need to make sure is that you don't just use the query string and name as keys, but the bind variables as well. Sorry, I'm not sure what you mean here though (may be too early in the morning and I'm being dumb) Yeah it was too early, I

Re: Cachedwithin + CFQUERYPARAM

2005-01-14 Thread Stuart Kidd
Thanks to everyone on their help on this. I'll start looking at the suggested work-arounds. Saturday On 13/1/05 7:03 pm, Dave Watts [EMAIL PROTECTED] wrote: It's not really a bug. Using CFQUERYPARAM with CFQUERY means that rather than a regular statement, CF is able to use prepared

Cachedwithin + CFQUERYPARAM

2005-01-13 Thread Stuart Kidd
Hi guys, I noticed that i had an error occuring while my cfquery with a cachedwithin also included a cfqueryparam, is that normal? Thanks, Saturday ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket

Re: Cachedwithin + CFQUERYPARAM

2005-01-13 Thread Raymond Camden
Yep. You can't mix em. Since I'd recommend cfqueryparam, I'd look into caching your query manually. On Thu, 13 Jan 2005 11:48:09 -0500, Stuart Kidd [EMAIL PROTECTED] wrote: Hi guys, I noticed that i had an error occuring while my cfquery with a cachedwithin also included a cfqueryparam

Re: Cachedwithin + CFQUERYPARAM

2005-01-13 Thread Dave Carabetta
On Thu, 13 Jan 2005 11:48:09 -0500, Stuart Kidd [EMAIL PROTECTED] wrote: Hi guys, I noticed that i had an error occuring while my cfquery with a cachedwithin also included a cfqueryparam, is that normal? Yep. You can't use cfqueryparam if you are using cachedwithin/cachedafter. Lame

Re: Cachedwithin + CFQUERYPARAM

2005-01-13 Thread Stuart Kidd
recommend cfqueryparam, I'd look into caching your query manually. On Thu, 13 Jan 2005 11:48:09 -0500, Stuart Kidd [EMAIL PROTECTED] wrote: Hi guys, I noticed that i had an error occuring while my cfquery with a cachedwithin also included a cfqueryparam, is that normal? Thanks, Saturday

RE: Cachedwithin + CFQUERYPARAM

2005-01-13 Thread COLLIE David
with cfqueryparam, you are telling it that these values may change... So how can CF cache a query that is going to change :) Caching queries manually, how is that done? Either in a shared scope (application or session) or physical disk (by WDDXing the query and then writing the file) hth

Re: Cachedwithin + CFQUERYPARAM

2005-01-13 Thread Jochem van Dieten
Stuart Kidd wrote: I noticed that i had an error occuring while my cfquery with a cachedwithin also included a cfqueryparam, is that normal? It is documented. http://www.macromedia.com/go/wish/ Jochem ~| Now there’s

Re: Cachedwithin + CFQUERYPARAM

2005-01-13 Thread Jochem van Dieten
COLLIE David wrote: Not got anything to do with MM AFAIK... It's more a database issue cos it uses bind variables which denote that the value will prolly change from query to query but still allows the database to build a compiled execution plan. There are no technical reasons why query

Re: Cachedwithin + CFQUERYPARAM

2005-01-13 Thread Keith Gaughan
Stuart Kidd wrote: Oh MM, sort it out! Caching queries manually, how is that done? You could store it in a struct in the APPLICATION scope, along with information identifying it and when it times out. It's not really a bug. Using CFQUERYPARAM with CFQUERY means that rather than a regular

RE: Cachedwithin + CFQUERYPARAM

2005-01-13 Thread Dave Watts
It's not really a bug. Using CFQUERYPARAM with CFQUERY means that rather than a regular statement, CF is able to use prepared statements, so the execution plan (depending on the RDBMS you're working with) can be cached for extra execution speed. To cache with both, it's have to store

Re: cfqueryparam and Unique Identifiers

2005-01-07 Thread Matt Robertson
CF_SQL_VARCHAR works in Access, mySQL, SQL Server, Oracle 8 and Oracle 9. A safe bet it works in Oracle 10. I'll have to check the docs on that IDSTAMP type. Never heard of it. rtfm. -- --mattRobertson-- President, Janitor MSB Web Systems mysecretbase.com

Re: CFQUERYPARAM issue

2005-01-06 Thread Duncan I Loxton
passed, that once I fixed, things seem to be working fine now. 1) Shouldn't the cfqueryparam value be #URL.cotid# and not Attributes ? No - fuseBox pushes form and URL into attributes on every request so you dont have to mess around when you change a form to get / post. While I am here - I have

Re: CFQUERYPARAM issue

2005-01-06 Thread Jochem van Dieten
Duncan I Loxton wrote: While I am here - I have read that using cfqueryparam gives a performance gain over not using it - is there any proof or technical data out there? An explanation over why/how it makes a query faster? http://www.google.com/custom?q=cfqueryparam+execution+plansitesearch

Re: CFQUERYPARAM issue

2005-01-06 Thread Thomas Chiverton
On Thursday 06 Jan 2005 09:13 am, Duncan I Loxton wrote: one affected. The fact that it had the ? on it threw me a bit and This is standard denotation for a bind parameter, which is what cfqueryparam does. -- Tom Chiverton Advanced ColdFusion Programmer Tel: +44 (0)1749 834900 email: [EMAIL

Re: CFQUERYPARAM issue

2005-01-06 Thread Al Everett
--- Jochem van Dieten [EMAIL PROTECTED] wrote: Duncan I Loxton wrote: While I am here - I have read that using cfqueryparam gives a performance gain over not using it - is there any proof or technical data out there? An explanation over why/how it makes a query faster? http

cfqueryparam and Unique Identifiers

2005-01-06 Thread Duncan I Loxton
We use UUId for our users primary key - what cfsqltype should I use to get the correct match? e.g. cfquery name=getStaffDetail dataSource=#Application.DataSource# userName=#Application.DBUserName# password=#Application.DBUserPwd# SELECT * FROM Users usr_id = cfqueryparam

Re: cfqueryparam and Unique Identifiers

2005-01-06 Thread Tyler Fitch
I've always used cfqueryparam value=#attributes.usr_id# cfsqltype=CF_SQL_CHAR length=35 and not had any problems. HTH, t On Fri, 7 Jan 2005 11:52:13 +1100, Duncan I Loxton [EMAIL PROTECTED] wrote: We use UUId for our users primary key - what cfsqltype should I use to get the correct match

Re: cfqueryparam and Unique Identifiers

2005-01-06 Thread Jochem van Dieten
usr_id = cfqueryparam value=#attributes.usr_id# cfsqltype=CF_SQL_UUID /cfquery There doesnt seem to be a match in the documentation - should I be using a different type that copes with UUID's? If there is a special type for UUIDs you will find it in the documentation of your database

Re: cfqueryparam and Unique Identifiers

2005-01-06 Thread Ian Skinner
The best that I know, as far as cfqueryparam is conserened a UUID is simply a 35 character string. I usually use char or varchar when I have them in a queryparam. Duncan I Loxton wrote: We use UUId for our users primary key - what cfsqltype should I use to get the correct match? e.g. cfquery

<    5   6   7   8   9   10   11   12   13   14   >