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
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!
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
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
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
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
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
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
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
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
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
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
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 -
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...
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 =
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
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
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
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
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,
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
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
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
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
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,
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
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
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,
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
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,
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
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
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
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!
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?
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.
36 matches
Mail list logo