Re: Dynamic query help.

2011-11-06 Thread Justin Scott

> ...I'm not sure how to update the dynamic query.

Hi Ray, I don't know much about the mechanics of your application, but
remember that once the HTML has been generated and the page loaded on
the client, the ColdFusion process is finished and that dynamic query
doesn't exist in memory anymore until the next page is loaded (unless
you're storing it in a session variable or other persistent memory).
For the sake of this case I'll assume that you have a form which is
posting changes back to the server, you're re-running the database
query, and need to make changes to the results after it's been run.

ColdFusion provides some built-in functions to alter a query object
[1].  You would probably be interested in queryAddRow() which adds one
or more rows to an existing query, and querySetCell() which can set
the value of a specific column in a specific row.

There is also the "query of queries" feature which will allow you to
use the CFQUERY tag to select sub-sets of existing query objects [2].
Ben Nadel wrote a custom tag [3] which provides a SQL-like method for
updating existing query objects in a more convenient manner than
running a bunch of querySetCell() functions.  In your case with shared
hosting that may not be an option, however.  I hope this can get you
going in the right direction though.


-Justin Scott



[1] 
http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec1a60c-7ffc.html#WSc3ff6d0ea77859461172e0811cbec22c24-67fe

[2] 
http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec0e4fd-7ff0.html

[3] 
http://www.bennadel.com/blog/1707-Running-UPDATE-And-DELETE-SQL-Statements-Using-ColdFusion-Query-Of-Queries.htm

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348491
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Output columns from a query that have been formatted as 2 words

2011-11-06 Thread Leigh

Modifying the sql to use an alias is preferable. But if that is not possible, 
you could create a copy with a valid name. Then use that column name instead. 


  

 

-Leig

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348490
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Output columns from a query that have been formatted as 2 words

2011-11-06 Thread Rex

Sorry, disregard my answer, it has been answered already and my solution 
is incorrect

On 11/6/2011 12:41 PM, Rex wrote:
> I posted an answer to this in CF-Newbie, sorry for the cross-post.
>
> In the QoQ, wrap the column name in single-quotes.  Only tried in 
> CF9+MSSQL, but it works:
>
> 
> SELECT 'this is data in the column' AS [COLUMN WITH SPACES IN THE 
> NAME]
> 
>
> 
> SELECT 'COLUMN WITH SPACES IN THE NAME' AS COLUMNNAME FROM 
> storedProcData
> 
>
> 
> 
>
> - Rex

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348489
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Output columns from a query that have been formatted as 2 words

2011-11-06 Thread Rex

I posted an answer to this in CF-Newbie, sorry for the cross-post.

In the QoQ, wrap the column name in single-quotes.  Only tried in 
CF9+MSSQL, but it works:


 SELECT 'this is data in the column' AS [COLUMN WITH SPACES IN THE NAME]



 SELECT 'COLUMN WITH SPACES IN THE NAME' AS COLUMNNAME FROM 
storedProcData





- Rex

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348488
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: hiding CF files

2011-11-06 Thread Justin Scott

> Is there a way of preventing a user navigating to E:/server/wwwroot/myapp/
> folder using Windows Explorer and delete the files associated with the app.

Using the NTFS permissions on the server would certainly do this for
you.  Start by creating a user account specifically for ColdFusion to
use.  I would recommend looking at the ColdFusion Server Lockdown
Guide [1] for information on setting up ColdFusion and IIS to use a
dedicated account for the ColdFusion services.

Next, set the permissions on the website's folder so that only
authorized users have read/write access to that folder.  Remove the
inherited permissions from that folder and set it to only allow the
ColdFusion user account and the Administrators group (and the Domains
Admins if you're on a Windows domain) to access the folder.

This will keep everyone else out of that folder and deny any changes
to any user not in the Administrators group or logged in as the
ColdFusion user.


-Justin


[1] 
http://www.adobe.com/content/dam/Adobe/en/products/coldfusion/pdfs/91025512-cf9-lockdownguide-wp-ue.pdf

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348487
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: hiding CF files

2011-11-06 Thread Mark A. Kruger

Akos,

That would be a matter of network policy. Your sys admin should protect that
folder and prevent folks from doing that.

-Mark

Mark Kruger - CFG
CF Webtools
www.cfwebtools.com
www.coldfusionmuse.com
O: 402.408.3733 x105
E: mkru...@cfwebtools.com
Skype: markakruger


-Original Message-
From: Akos Fortagh [mailto:akos.fort...@yahoo.com] 
Sent: Sunday, November 06, 2011 4:58 AM
To: cf-talk
Subject: hiding CF files


Hi everyone, I'm developing my first off-line simple shop inventory
application which will run on windows system in an a browser.  I class
myself as an intermediate developer so please forgive me if I'm asking
something odd.
Multiple users will have access to the same system on the same machine.
Is there a way of preventing a user navigating to E:/server/wwwroot/myapp/
folder using Windows Explorer and delete the files associated with the app.
Any help would be greatly appreciated.
Thanks 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348486
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Create CSV and TAB docs

2011-11-06 Thread Dorioo

If you're familiar with how to access java in coldfusion, I've found this
library to be very useful when creating "delimited" files.

http://www.csvreader.com/java_csv.php

- Gabriel

On Sun, Nov 6, 2011 at 1:26 AM, Torrent Girl  wrote:

>
> >On 11/4/2011 11:39 PM, Torrent Girl wrote:
> >
> >> the problem is the file will be created on the fly by remote
> >users who will import the data and won't have time to manipulate
> >it by hand.
> >
> >Do you need the time? If not, just send the -mm-dd format
> >and see if that will open up automatically in Excel as date.
> >
> >I don't know a way to specify a date time automatically in Excel
> >from a CSV file opening. If someone knows, please let us know.
> >
> >--
> Thanks I was able to format the data. It works now.
>
> Any suggestions on creating a TAB file in CF?
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348485
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: hiding CF files

2011-11-06 Thread Russ Michaels

If your network users have read/write access to that drive/folder,
then no there is nothing stopping them.
But users of your webapp should not have network access to your server.


On Sun, Nov 6, 2011 at 10:58 AM, Akos Fortagh  wrote:
>
> Hi everyone, I'm developing my first off-line simple shop inventory 
> application which will run on windows system in an a browser.  I class myself 
> as an intermediate developer so please forgive me if I'm asking something odd.
> Multiple users will have access to the same system on the same machine.
> Is there a way of preventing a user navigating to E:/server/wwwroot/myapp/ 
> folder using Windows Explorer and delete the files associated with the app.
> Any help would be greatly appreciated.
> Thanks
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348484
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


hiding CF files

2011-11-06 Thread Akos Fortagh

Hi everyone, I'm developing my first off-line simple shop inventory application 
which will run on windows system in an a browser.  I class myself as an 
intermediate developer so please forgive me if I'm asking something odd.
Multiple users will have access to the same system on the same machine.
Is there a way of preventing a user navigating to E:/server/wwwroot/myapp/ 
folder using Windows Explorer and delete the files associated with the app.
Any help would be greatly appreciated.
Thanks 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348483
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm