On Mon, 21 Jun 2004 21:20:41 +0200, Pascal Peters <[EMAIL PROTECTED]> wrote:
>
> It will only break on case-sensitive DBs like ORACLE. But even then you
> can convert the strings to lowercase
>
> WHERE LOWER(directory) = <cfqueryparam cfsqltype="cf_sql_varchar"
> value="#Lcase(variables.CurrentDirectory)#>
>
> (or whatever the lowercase function is on the DB)
>
Well, I'd be careful before utilizing that strategy, particularly for
a case like Oracle. If you use a DB function around a column name,
such as you have with LOWER(directory), then Oracle will not use an
index to search if one exists on that column. This can have a major
impact on query performance, depending on the size of your table.
>
> PS As Barney and I said: you can use "\/" as dilimiter to make it *nix
> compliant
Or you could call this UDF and not worry about it (adapted from
Christian Cantrell's blog entry at
http://www.markme.com/cantrell/archives/002195.cfm:
function getFileSeparator() {
var fileObj = "";
fileObj = createObject("java", "java.io.File");
return fileObj.separator;
}
in your code:
<cfset DirPath = GetDirectoryFromPath(GetCurrentTemplatePath()) />
<cfset CurrentDirectory = ListLast(DirPath, getFileSeparator()) />
Regards,
Dave.
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
[Donations and Support]
- RE: Follow Up on Case Sensititive ( was Determining Dire... Pascal Peters
- Re: Follow Up on Case Sensititive ( was Determining... Dave Carabetta
- Re: Follow Up on Case Sensititive ( was Determi... Jochem van Dieten