Re: CF8 cfexecute Problem

2011-08-03 Thread Dave Watts
Hmmm... This runs via   cfhttp url=http://www.myserverdev.com/ipi_grabber/get.cfm?w=#xWaitDocTime#s=#lcase(attributes.website)# result=grabResult /. So the caller is on a different server than the webshot program. The caller of the CF program is really irrelevant here. It's the user

Re: CF8 cfexecute Problem

2011-08-03 Thread Richard Steele
That worked! Thank you so much! Is it because both the program Webshot and ColdFusion were installed under my user account? ~| Order the Adobe Coldfusion Anthology now!

Resetting cached components

2011-08-03 Thread Eric Cobb
I've got a hypothetical situation that entered into me little brain this morning that I thought I'd ping the group on for answers. Let's say I've got an object cached in the application scope. The call to this CFC is used throughout the site, which gets a lot of traffic. Everything inside

Re: Specifying Excel Data Types in CFCONTENT?

2011-08-03 Thread Feras Nabulsi
Thanks for the info, now that the project is not hold anymore, I will do this. I've used the POIUtility long ago, I'll check it out again. so I can't develop for 9 strictly yet. As an alternative, try the POIUtility.cfc. Like cfspreadsheet it generates a true Excel file. IIRC it should

cffunction - initialize query as empty string or QueryNew

2011-08-03 Thread Gerald Weir
Hello, We are discussing the proper way to initialize a query in a cffunction. Does it make a significant difference to use QueryNew rather than (empty string) as in the following: cfcomponent cffunction name=test access=public returntype=query output=false .this? cfset var

Label Printer

2011-08-03 Thread Chad Gray
I have an inventory website and it would be nice to be able to print barcodes and product data to a label printer. Has anyone tried sending webpage content to a label printer? Or maybe there are some printers that can take XML content?? Looks like Zebra printers have their own printer

RE: Label Printer

2011-08-03 Thread Jason Fisher
Dymo LabelWriter comes with ActiveX component and code sample that make it easy to do. -Original Message- From: Chad Gray cg...@careyweb.com Sent: Wednesday, August 03, 2011 11:50 AM To: cf-talk cf-talk@houseoffusion.com Subject: Label Printer I have an inventory website and it

Re: cffunction - initialize query as empty string or QueryNew

2011-08-03 Thread Leigh
creates the myQuery variable as a string and not as a query.  It does. But as soon as your run the cfquery the myQuery variable is essentially becomes a query object. Does it make a significant difference to use QueryNew rather than (empty string) as in the following: For a function

Re: Label Printer

2011-08-03 Thread Nathan Strutz
Chad, I recommend you get a 3rd party printing application that is easy to integrate with. Seagull Scientific's BarTender works with Zebra printers, among many others, and integrates with web services, databases, COM automation, ActiveX controls, command-line calls, and probably more. That way

Running systeminfo with CFEXECUTE returns an empty string. Why?

2011-08-03 Thread Scott Niven
Any ideas what I'm doing wrong? Here's my code: cfexecute name=c:\windows\system32\systeminfo.exe arguments=/FO CSV variable=data timeout=10 / cfdump var=#data# I've also tried running it without the arguments (see below). Both the code above and the code below return

(ot) CFBuilder / Change format of default CFINVOKE tag

2011-08-03 Thread Brook Davies
Sorry for the OT post, I haven't had any luck finding an answer to this one: When I use the services browser insert CFINVOKE option, it inserts it like this: -- cfinvoke component=application.logging.Log method=call cfinvokeargument name=SMS

Re: CF8 cfexecute Problem

2011-08-03 Thread Dave Watts
That worked! Thank you so much! Is it because both the program Webshot and ColdFusion were installed under my user account? It's possible, but it's also possible that it was something not quite the same, but somewhat similar. I realize that's not a very satisfactory explanation, but I'd need

Re: cffunction - initialize query as empty string or QueryNew

2011-08-03 Thread Peter Boughton
It doesn't matter - CFML is not like Java (where you must pre-define variables with strict types). In CFML, variables can change types at any time. If you're just var scoping a cfquery variable, it doesn't matter what you use. (I would guess using QueryNew might be ever so slightly slower -

RE: Running systeminfo with CFEXECUTE returns an empty string. Why?

2011-08-03 Thread Bill Franklin
Logon to the CF server using the name of the user that CF was installed with and try running systeminfo.exe using a CMD prompt. My guess is that it is using a user that doesn't have permission to run that process, as I tried the second command you provided, and it worked just fine...

Re: cffunction - initialize query as empty string or QueryNew

2011-08-03 Thread Gerald Weir
Leigh, Peter, Thanks for your comments. All makes sense to me. If I can ask one follow-up on Peter's answer though. I've recently started to work on CF9 and was using my cffunction techniques from the CF8 days. i.e., cfset var local = StructNew() cfset local.myVar1 = cfset local.myVar2 =

Re: cffunction - initialize query as empty string or QueryNew

2011-08-03 Thread Peter Boughton
With CF9 you don't need the var keyword anymore, and if you don't need backwards compatible code it's (arguably) clearer to not use it at all. That means, do NOT use either of your examples, unless you _need_ a value in myvar1/myvar2 at the start. Perhaps a good way to explain it is to use

Re: cffunction - initialize query as empty string or QueryNew

2011-08-03 Thread Peter Boughton
With CF9 you don't need the var keyword anymore, and if you don't need backwards compatible code it's (arguably) clearer to not use it at all. That means, do NOT use either of your examples, unless you _need_ a value in myvar1/myvar2 at the start. Perhaps a good way to explain it is to use

Re: cffunction - initialize query as empty string or QueryNew

2011-08-03 Thread Gerald Weir
Peter, great examples, really helpful. In a nutshell, if I get it, in CF9 you do not need to use: cfset var local = StructNew() / because you are going to define your vars as: local.myVar1 and local.myVar2 and the local structure is already defined by default. You refer to your vars

COMPLEX SQL RANDOM

2011-08-03 Thread Robert Harrison
I have this SQL statement below. cfquery name=random_poll datasource=#dsn# SELECT DISTINCT portal_polls.poll_id, portal_polls.question, portal_polls.answer1, portal_polls.answer2, portal_polls.answer2, portal_polls.answer4, portal_polls.answer4, portal_polls.number_answers

RE: COMPLEX SQL RANDOM

2011-08-03 Thread Robert Harrison
What I'm trying to do should look like this: cfquery name=random_poll datasource=#dsn# SELECT DISTINCT TOP 1 portal_polls.poll_id, portal_polls.question, portal_polls.answer1, portal_polls.answer2, portal_polls.answer2, portal_polls.answer4, portal_polls.answer4,

Re: COMPLEX SQL RANDOM

2011-08-03 Thread Steve Milburn
Since the query you have gives you the list of polls that you want, what about dumping the results of that query into a temp table, and doing a random select on the temp table with SELECT TOP 1 and ORDER BY NEWID() ? Steve On Wed, Aug 3, 2011 at 2:43 PM, Robert Harrison

RE: COMPLEX SQL RANDOM

2011-08-03 Thread Robert Harrison
Since the query you have gives you the list of polls that you want, what about dumping the results of that query into a temp table, and doing a random select on the temp table with SELECT TOP 1 and ORDER BY NEWID() ? I have considered that, but this should be possible in one straight up SQL

RE: COMPLEX SQL RANDOM

2011-08-03 Thread Leigh
But when I do that it tells me: ORDER BY items must appear in the select list if SELECT DISTINCT is specified. I cannot speak for the query itself, but using a derived table comes to mind as a possibility. ~| Order the Adobe

Re: COMPLEX SQL RANDOM

2011-08-03 Thread Steve Milburn
The error message you are getting is because the value of your order by clause, newID(), is not a part of your list of values you are selecting. You could, of course, include it in your list of values by first setting it to a variable, like so: declare @orderClause as uniqueidentifier; set

RE: COMPLEX SQL RANDOM

2011-08-03 Thread Bill Franklin
Why not try something like this...(not sure which database you are using) SELECT TOP 1 * FROM ( SELECT DISTINCT portal_polls.poll_id, portal_polls.question, portal_polls.answer1, portal_polls.answer2, portal_polls.answer2, portal_polls.answer4, portal_polls.answer4,

Re: COMPLEX SQL RANDOM

2011-08-03 Thread Jochem van Dieten
On Wed, Aug 3, 2011 at 8:43 PM, Robert Harrison wrote: Normally I would use TOP 1 and ORDER BY NEWID() to do this.  But it doesn't like that with the DISTINCT clase. I'm using DISTINCT because the same poll could come up several times if it's allowed in multiple groups and that use is in

Re: COMPLEX SQL RANDOM

2011-08-03 Thread Leigh
because every row in your resulting recordset now has a field called fieldC with the value of your previously generated ID That is because a variable is used rather of calling the function directly within the SELECT list. The latter (usually) forces the function to be evaluated once per

Re: COMPLEX SQL RANDOM

2011-08-03 Thread Jochem van Dieten
On Wed, Aug 3, 2011 at 9:36 PM, Bill Franklin wrote: Why not try something like this...(not sure which database you are using) SELECT TOP 1 * FROM (        SELECT DISTINCT portal_polls.poll_id, portal_polls.question, portal_polls.answer1, portal_polls.answer2, portal_polls.answer2,

Re: COMPLEX SQL RANDOM

2011-08-03 Thread Leigh
Offhand do you know if there are any issues using NEWID() within CTE's? I have a vague recollection of issues with that function. Either when used within CTE's or possible derived tables. Not sure. -Leigh ~| Order the Adobe

Re: Resetting cached components

2011-08-03 Thread Jochem van Dieten
On Wed, Aug 3, 2011 at 4:41 PM, Eric Cobb wrote: Let's say I've got an object cached in the application scope.  The call to this CFC is used throughout the site, which gets a lot of traffic. Everything inside the CFC is var scoped, and it's completely encapsulated. It's just runs a query,

Re: COMPLEX SQL RANDOM

2011-08-03 Thread Jochem van Dieten
On Wed, Aug 3, 2011 at 10:13 PM, Leigh wrote: Offhand do you know if there are any issues using NEWID() within CTE's? I have a vague recollection of issues with that function. Either when used within CTE's or possible derived tables. Not sure. Not that I am aware off. But then again, I

Re: COMPLEX SQL RANDOM

2011-08-03 Thread Leigh
Not that I am aware off. But then again, I didn't even know that uniqueidentifiers had a comparator nowadays and could be sorted :) Yeah, it is hard to keep up with all the changes. Anyway, I may have a around later. If I actually manage to find a reference, I will post back ;) -Leigh

Re: Label Printer

2011-08-03 Thread Jochem van Dieten
On Wed, Aug 3, 2011 at 5:50 PM, Chad Gray wrote: I have an inventory website and it would be nice to be able to print barcodes and product data to a label printer. Do you want to print to your own printer or should the visitor print to his printer? In the latter case it may be a better idea

Re: ODBC (microsoft access) DSN's not working

2011-08-03 Thread David Moore
Russ, Did you ever figure out what was going on because I am having the exact same issue. David Moore ~| Order the Adobe Coldfusion Anthology now!

Mac 10.7 datasource problem

2011-08-03 Thread Mike P
Since I upgraded to lion, my sql server datasource has stopped working. The error message i'm getting is: java.sql.SQLNonTransientConnectionException: [Macromedia][SQLServer JDBC Driver]No more data available to read. Anyone know anything about this?

Re: ODBC (microsoft access) DSN's not working

2011-08-03 Thread Russ Michaels
yes I did, here are the details. http://www.michaels.me.uk/post.cfm/msaccess-dsn-s-no-longer-work-after-cf-9-0-1-upgrade On Wed, Aug 3, 2011 at 11:56 PM, David Moore dgmoor...@hotmail.com wrote: Russ, Did you ever figure out what was going on because I am having the exact same issue.