Re: Opening Local Files

2014-08-26 Thread Jochem van Dieten

On Aug 25, 2014 3:40 PM, Richard White wrote:
 We have created an online database program. I have a requirement for a
user to store links to files contained on their local machines, then at the
click of a button it will open the file.

Open the file how? With the default application installed on their local
machine? In that case just linking to the file should work once the user
has configured the application and permissions.

Jochem


~|
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:359193
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Opening Local Files

2014-08-26 Thread C. Hatton Humphrey

On Mon, Aug 25, 2014 at 9:39 AM, Richard White rich...@re-base.net wrote:

 We have created an online database program. I have a requirement for a
 user to store links to files contained on their local machines, then at the
 click of a button it will open the file.

 If we were to store these files on our server I know we could use cfheader
 and cfcontent to open the file. However, seeing as the files are stored on
 their local machines how can I achieve this?


Assuming you mean that you need to open the file that is stored on the
user's computer and do something with it on the server, there has to be a
tool that transfers that file from the client first.

We use a web app that does that by making use of a SoftArtisans ActiveX
plug-in called XFile.  It works something like this:
1. On the server, the path and filename is stored in the per-user database
settings
2. When the page is pulled the active-x initiates the file-transfer and
saves the file locally.  The user is prompted to confirm.
3. The page continues processing.

File transfer is still required, it's just handled a bit more seamlessly
than an upload button or FTP.

Until Later!
C. Hatton Humphrey

Every cloud does have a silver lining.  Sometimes you just have to do some
smelting to find it.


~|
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:359194
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Querying a comma separated list

2014-08-26 Thread te...@it-werks.com te...@it-werks.com

I haven't done this is ages  and could use some help, please.

Here I define a list of checkboxes of picture types:

input type=checkbox name=tt value=1 cfif gtype contains 
'1'checked/cfifSolidbr
input type=checkbox name=tt value=2 cfif gtype contains 
'2'checked/cfifOpenbr
input type=checkbox name=tt value=3 cfif gtype contains 
'3'checked/cfifInsulatedbr
input type=checkbox name=tt value=4 cfif gtype contains 
'4'checked/cfifCombinationbr

At form submit I update the record:
cfquery name=upcontent datasource=#dsn# maxrows=1
update pgallery set gtype = '#tt#' 
where id = #picid#
/cfquery

Now here's where I screw up:
cfquery name=getslides datasource=#dsn#
select * from pgallery where listContains(gtype, 1)
/cfquery

Here;s the error:
Error Executing Database Query.  
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft 
Access Driver] Undefined function 'listContains' in expression.  

Terry


~|
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:359195
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Querying a comma separated list

2014-08-26 Thread Jon Clausen

listContains() isn’t a function of the database but, rather, a CFML function.  
If you’re storing the list as a string list, and are querying the database, 
then your query will have to use Access string functions as it doesn’t know 
CFML:

http://www.techonthenet.com/access/functions/

HTH,
Jon



On Aug 26, 2014, at 8:13 PM, te...@it-werks.com te...@it-werks.com 
te...@it-werks.com wrote:

 
 I haven't done this is ages  and could use some help, please.
 
 Here I define a list of checkboxes of picture types:
 
 input type=checkbox name=tt value=1 cfif gtype contains 
 '1'checked/cfifSolidbr
 input type=checkbox name=tt value=2 cfif gtype contains 
 '2'checked/cfifOpenbr
 input type=checkbox name=tt value=3 cfif gtype contains 
 '3'checked/cfifInsulatedbr
 input type=checkbox name=tt value=4 cfif gtype contains 
 '4'checked/cfifCombinationbr
 
 At form submit I update the record:
   cfquery name=upcontent datasource=#dsn# maxrows=1
   update pgallery set gtype = '#tt#' 
   where id = #picid#
   /cfquery
 
 Now here's where I screw up:
 cfquery name=getslides datasource=#dsn#
 select * from pgallery where listContains(gtype, 1)
 /cfquery
 
 Here;s the error:
 Error Executing Database Query.  
 [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft 
 Access Driver] Undefined function 'listContains' in expression.  
 
 Terry
 
 
 

~|
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:359196
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Querying a comma separated list

2014-08-26 Thread Bill Moniz

I'm pretty certain you can't do what you're trying to do directly.  The
comma delimited list you have stored in gtype is just a string as far as
the DB engine is concerned and cannot be searched as a list.  If you must
store it this way, I have achieved the result I think you want, in the
past, with the following somewhat ugly query:

cfquery name=getslides datasource=#dsn#
select*
from  pgallery
wheregtype LIKE '1' OR gtype LIKE '1,%' OR gtype LIKE '%,1' OR gtype
LIKE '%,1,%'
/cfquery

Basically this manually searches the string for the four possible positions
for your target element in a comma delimited list:
1. Element is the only thing in the list
2. Element begins the list
3. Element ends the list
4. Element is in the list between two other elements

Hope that helps.  Also I'm basing this on my experience with MS-SQL so
apologies if MS-ACCESS actually does provide a way to do this natively.


On 27 August 2014 10:32, Jon Clausen jon_clau...@silowebworks.com wrote:


 listContains() isn’t a function of the database but, rather, a CFML
 function.  If you’re storing the list as a string list, and are querying
 the database, then your query will have to use Access string functions as
 it doesn’t know CFML:

 http://www.techonthenet.com/access/functions/

 HTH,
 Jon



 On Aug 26, 2014, at 8:13 PM, te...@it-werks.com te...@it-werks.com 
 te...@it-werks.com wrote:

 
  I haven't done this is ages  and could use some help, please.
 
  Here I define a list of checkboxes of picture types:
 
  input type=checkbox name=tt value=1 cfif gtype contains
 '1'checked/cfifSolidbr
  input type=checkbox name=tt value=2 cfif gtype contains
 '2'checked/cfifOpenbr
  input type=checkbox name=tt value=3 cfif gtype contains
 '3'checked/cfifInsulatedbr
  input type=checkbox name=tt value=4 cfif gtype contains
 '4'checked/cfifCombinationbr
 
  At form submit I update the record:
cfquery name=upcontent datasource=#dsn# maxrows=1
update pgallery set gtype = '#tt#'
where id = #picid#
/cfquery
 
  Now here's where I screw up:
  cfquery name=getslides datasource=#dsn#
  select * from pgallery where listContains(gtype, 1)
  /cfquery
 
  Here;s the error:
  Error Executing Database Query.
  [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC
 Microsoft Access Driver] Undefined function 'listContains' in expression.
 
  Terry
 
 
 

 

~|
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:359197
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Querying a comma separated list

2014-08-26 Thread Jerry Milo Johnson

Back when i used to pack fields with comma delimited strings, i used to do
something like this:

select * from pgallery where concat(',', gtype,',') like '%,1,%'


(add the , to the front and back of the string to test, so the value you
want is always ,VAL,)

this then only runs one like query, rather than multiple.

not sure if it is better, but it was simpler for me to understand

hth
Jerry Milo Johnson



On Tue, Aug 26, 2014 at 8:41 PM, Bill Moniz hydro.b...@gmail.com wrote:


 I'm pretty certain you can't do what you're trying to do directly.  The
 comma delimited list you have stored in gtype is just a string as far as
 the DB engine is concerned and cannot be searched as a list.  If you must
 store it this way, I have achieved the result I think you want, in the
 past, with the following somewhat ugly query:

 cfquery name=getslides datasource=#dsn#
 select*
 from  pgallery
 wheregtype LIKE '1' OR gtype LIKE '1,%' OR gtype LIKE '%,1' OR gtype
 LIKE '%,1,%'
 /cfquery

 Basically this manually searches the string for the four possible positions
 for your target element in a comma delimited list:
 1. Element is the only thing in the list
 2. Element begins the list
 3. Element ends the list
 4. Element is in the list between two other elements

 Hope that helps.  Also I'm basing this on my experience with MS-SQL so
 apologies if MS-ACCESS actually does provide a way to do this natively.


 On 27 August 2014 10:32, Jon Clausen jon_clau...@silowebworks.com wrote:

 
  listContains() isn’t a function of the database but, rather, a CFML
  function.  If you’re storing the list as a string list, and are querying
  the database, then your query will have to use Access string functions as
  it doesn’t know CFML:
 
  http://www.techonthenet.com/access/functions/
 
  HTH,
  Jon
 
 
 
  On Aug 26, 2014, at 8:13 PM, te...@it-werks.com te...@it-werks.com 
  te...@it-werks.com wrote:
 
  
   I haven't done this is ages  and could use some help, please.
  
   Here I define a list of checkboxes of picture types:
  
   input type=checkbox name=tt value=1 cfif gtype contains
  '1'checked/cfifSolidbr
   input type=checkbox name=tt value=2 cfif gtype contains
  '2'checked/cfifOpenbr
   input type=checkbox name=tt value=3 cfif gtype contains
  '3'checked/cfifInsulatedbr
   input type=checkbox name=tt value=4 cfif gtype contains
  '4'checked/cfifCombinationbr
  
   At form submit I update the record:
 cfquery name=upcontent datasource=#dsn# maxrows=1
 update pgallery set gtype = '#tt#'
 where id = #picid#
 /cfquery
  
   Now here's where I screw up:
   cfquery name=getslides datasource=#dsn#
   select * from pgallery where listContains(gtype, 1)
   /cfquery
  
   Here;s the error:
   Error Executing Database Query.
   [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC
  Microsoft Access Driver] Undefined function 'listContains' in expression.
  
   Terry
  
  
  
 
 

 

~|
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:359198
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm