http://www.switch-box.org/cfsqltool/ is a new tool that makes working with
CF and stored procedures easy. The tool works with CFMX and SQL Server. We
are still beta testing, but it will be GPL'd on the exchange when the
testing is done. Because we are still testing, you may see some strange output.
Originally I wrote some CF to help do stored procedures for inserts with
CF5. Since then it has expanded to this version what is CFMX.
If you are new to stored procedures or even experienced, the tool has a
wizard for generating insert and update procedures. Another wizard can be
run that will generate a CFFunction. It even documents the function by
adding a copy of the procedure's SQL.
CFMX CFC's really makes working with stored procedures much easier than
other CF versions.
So to learn the CF coding,
1. Make an insert stored procedure.
A. pick the MindTargetSQL database and run the Build Insert procedure.
B. The bottom left menu will load a list of all the tables in the DB.
C. Select a table -- tContacts
D. The table column selection menu will appear in the main exhibit frame.
E. Use the checked boxes the wizard picks and check the RS box for ContactID
The SQL code will show in a textarea box. This is ready for your DBA.
2. Build the CF Code.
A. In the top right frame select MindTargetSQL and User Stored Procedure
CFC wizard.
B. On the left menu, choose pr_tContacts_INS
C. In the exhibit frame, click on Show Generated Code.
(How about that? 3-click-coding. A new term. And a challenge.)
The popped window has all the CF code to run a stored procedure and some
pre-defined namespaces. While the code is CFMX, a few hacks and it can be CF5.
Now, one of the neat features of CFMX is the CFC.
Try this: back in the left menu, select all the pr_tContacts procedures and
hit submit.
Wa-la in the exhibit frame pop window is a CFC with cffunctions for the
procedures you just submitted.
Joseph
Joseph
At 07:12 AM 3/5/2004, you wrote:
>Hi all...In my 7 years of using CF, I have never used a stored
>procedure. Can anyone help me understand how I need to code it? For
>example purposes, lets just say I have 2 values that I need to pass to
>it. How would this be coded?
>
>Thanks much,
>
>Brian
>
>----------
>[
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Butch Zaccheo wrote:
>We send out 5,000 emails at a time, at least twice a week using
>cfmail... It doesnąt even seem to effect the server... (CF5 server)
I've been doing pretty much the same thing for years with CF 4.5.1sp2, and recently 6.1. Neither CF version notices the load, although to be fair I do throttle down the speed they get fed to the server (which is shared by several clients, many of which have membership mailing lists) to something like 3600 per hour per mailing.
My understanding of CF 6.1's mail improvements are that the benefits really shine on genuinely BIG stuff.
With that said, I tested out Infusion a few weeks back while I was evaluating whether or not to add a dedicated SMTP engine for those mailers. Infusion was really a stellar product.
--
-------------------------------------------
Matt Robertson, matt@...
MSB Designs, Inc. http://mysecretbase.com
-------------------------------------------
Or turn of the file-system cache in the CF administrator. You'll
potentially lose some performace (if your template cache isnt' big enough),
and after cycling the server, it'll be a little slower, but certainly a
doable situation if the problem isn't worth getting a bigger disk.
Cheers,
barneyb
> -----Original Message-----
> From: Dave Watts [mailto:dwatts@...]
> Sent: Friday, March 05, 2004 3:52 PM
> To: CF-Talk
> Subject: RE: help - CFMX creates class files... my C:\ drive
> is filling up !
>
> > My C:\ drive doesn't have lots of space and I see that CFMX
> > wants to store lots of .class files in..
> >
> > C:\CFusionMX\wwwroot\WEB-INF\cfclasses\
> >
> > Is there somewhere where I can tell CFMX to store them in
> > D:\cfclasses instead?
>
> You can change the directory in web.xml, but I'm not sure
> exactly how that's
> going to work for you:
>
> <context-param id="macromedia_context_2">
> <param-name>coldfusion.compiler.outputDir</param-name>
> <param-value>/WEB-INF/cfclasses</param-value>
> <description>This is the directory where we will place compiled
> pages. It must be relative to the webapp root.
> </description>
> </context-param>
>
> I'm not sure whether the "webapp root" will refer to the root
> directory of
> your web server, or whether it refers to the directory within
> CFMX which
> contains WEB-INF.
>
> If changing that doesn't work for you, you can always just
> create a symbolic
> link, I suppose:
>
> http://www.sysinternals.com/ntw2k/source/misc.shtml#junction
>
> Dave Watts, CTO, Fig Leaf Software
> http://www.figleaf.com/
> phone: 202-797-5496
> fax: 202-797-5444
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
> My C:\ drive doesn't have lots of space and I see that CFMX
> wants to store lots of .class files in..
>
> C:\CFusionMX\wwwroot\WEB-INF\cfclasses\
>
> Is there somewhere where I can tell CFMX to store them in
> D:\cfclasses instead?
You can change the directory in web.xml, but I'm not sure exactly how that's
going to work for you:
<context-param id="macromedia_context_2">
<param-name>coldfusion.compiler.outputDir</param-name>
<param-value>/WEB-INF/cfclasses</param-value>
<description>This is the directory where we will place compiled
pages. It must be relative to the webapp root.
</description>
</context-param>
I'm not sure whether the "webapp root" will refer to the root directory of
your web server, or whether it refers to the directory within CFMX which
contains WEB-INF.
If changing that doesn't work for you, you can always just create a symbolic
link, I suppose:
> > If you're running the SunONE app server, the only way I
> > know of to get it to coexist nicely with MX is to install
> > MX onto a SunONE app server instance, rather than using the
> > "server configuration" install of MX. Otherwise, MX will
> > interdict all requests for servlets from the SunONE web server.
>
> any clues where i can fidn that sort of info?
In the SunONE GUI, there's an option to create a new server. I don't
remember what it's called, but it was fairly easy to find. I couldn't
actually do it, though, since I was running the developers' version of
SunONE, which was a bummer - you can create as many servers as you like with
JRun's developers' version.
When installing CFMX, you'd want to pick the option that lets you create a
WAR or EAR file. I forget which one is the preferred format for SunONE, but
it's documented on the Macromedia site:
On the subject of Homesite / CFStudio, you can update your current version so that it
includes all the new tags and functions of CFMX for free ... i just don't have the url
handy at the moment. Should be able to find it easily on macromedia.com
-----Original Message-----
From: Michael Dinowitz [mailto:mdinowit@...]
Sent: Friday, March 05, 2004 10:15 PM
To: CF-Talk
Subject: Re: Infusion
I still use CFStudio and officially Homesite+ is the upgrade for Studio. Buy
Dreamweaver, get HS+ and it's cheaper.
We send out 5,000 emails at a time, at least twice a week using cfmail... It
doesnąt even seem to effect the server... (CF5 server)
BZaccheo
On 3/5/04 12:52 PM, "Adrocknaphobia" <adrocknatalk@...> wrote:
> I send close to 5,000 emails in one shot with CFMX per day. Runs like a champ,
> although I'd dont recommend doing this with a high volume site. It takes about
> 20 minutes to send them all, and during that time your site will reflect it.
>
> btw. prior to 6.1, no way in heck could CF handle it.
>
> -Ada,
>
>> > -----Original Message-----
>> > From: Robert Orlini [mailto:rorlini@...]
>> > Sent: Friday, March 5, 2004 08:02 PM
>> > To: 'CF-Talk'
>> > Subject: Infusion
>> >
>> > Anyone out there using Infusion Mail Server for their CF apps as opposed to
>> CFMail?
>> >
>> > We want to create a email list of users that would be informed of the
>> status of our website. I believe CFMail may have a problem with sending out
>> more than 100 or 200 emails at a time.
>> >
>> > Would this package help us?
>> >
>> > Robert O.
>> > HWW
>> >
>> >
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Kevin Graeme wrote:
>
> With session management, IIRC it has to do with how each window in IE is a
> separate application instance while in Netscape there is only one
> application instance with separate windows.
>
> (If I'm off on that, I'm sure someone will jump down my throat. It's been a
> while since we dealt with it explicitly and my memory is shoddy.)
<jump>
In IE, windows opened from another IE instance run in the same
process as the parent. They share cookies. However, windows
opened from a link to the iexplorer executable run as separate
processes. They don't share session cookies.
All FireFox windows share the same process and the same cookies.
We routinely use CF5's CFMAIL for mailings to over 100,000 recipients. For
something like a monthly newsletter it's not unnecessary to send them all at
once, so we've developed ways of pacing the output to a couple thousand every
5 minutes for a period of several hours.
----- Original Message -----
From: "Robert Orlini" <rorlini@...>
To: "CF-Talk" <cf-talk@...>
Sent: Friday, March 05, 2004 1:02 PM
Subject: Infusion
> Anyone out there using Infusion Mail Server for their CF apps as opposed to
CFMail?
>
> We want to create a email list of users that would be informed of the
status of our website. I believe CFMail may have a problem with sending out
more than 100 or 200 emails at a time.
>
> Would this package help us?
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
>One more thing, with CFMX I heard there is no more CF Studio
>and I have to purchase Dreamweaver or another Macromedia product?
Have to? No, not at all. Many people have continued to use CF Studio for
CFMX development, it's just an editor. Homesite+ comes with
DreamweaverMX but it's basically just a new name, new icon and a few
non-critical updates to the previous CF Studio version.
called either directly in the scheduler or from within a batch file will do the trick.
--
-------------------------------------------
Matt Robertson, matt@...
MSB Designs, Inc. http://mysecretbase.com
-------------------------------------------
I send close to 5,000 emails in one shot with CFMX per day. Runs like a champ, although I'd dont recommend doing this with a high volume site. It takes about 20 minutes to send them all, and during that time your site will reflect it.
btw. prior to 6.1, no way in heck could CF handle it.
-Ada,
> -----Original Message-----
> From: Robert Orlini [mailto:rorlini@...]
> Sent: Friday, March 5, 2004 08:02 PM
> To: 'CF-Talk'
> Subject: Infusion
>
> Anyone out there using Infusion Mail Server for their CF apps as opposed to CFMail?
>
> We want to create a email list of users that would be informed of the status of our website. I believe CFMail may have a problem with sending out more than 100 or 200 emails at a time.
>
> Would this package help us?
>
> Robert O.
> HWW
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Dreamweaver has HomeSite+ in it, which is basically today's iteration of CFStudio. DW is as much or *less* than Studio's price was. I got an upgrade yesterday for about US$200 from MM. I'm not sure what full retail is.
Haven't had time to do much more than put in my editor fonts/colors.
--
-------------------------------------------
Matt Robertson, matt@...
MSB Designs, Inc. http://mysecretbase.com
-------------------------------------------
One more thing, with CFMX I heard there is no more CF Studio and I have to purchase Dreamweaver or another Macromedia product?
Robert O.
-----Original Message-----
From: Michael Dinowitz [mailto:mdinowit@...]
Sent: Friday, March 05, 2004 3:19 PM
To: CF-Talk
Subject: Re: Infusion
This list is run on iMS. I wrote the entire mailing list, archives, etc.
around it. iMS rules!
As for CFMAIL, it should not have problems sending out a few hundred emails
as a time. I've done a few thousand at once with no problem and that was on
CF 5. CFMX is better.
> Anyone out there using Infusion Mail Server for their CF apps as opposed
to CFMail?
>
> We want to create a email list of users that would be informed of the
status of our website. I believe CFMail may have a problem with sending out
more than 100 or 200 emails at a time.
>
> Would this package help us?
>
> Robert O.
> HWW
>
>
_____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
I've used the scheduler since it was first put into CF (even wrote a chapter
on it) and I've never had a problem. Other have had problems that have been
hard to trace. If your going to use it follow a few simple rules.
1. The template being run should be able to run from an url without a
problem.
2. Test the template using CFHTTP to make sure it works
3. The scheduler is NOT a web browser so things like cookies, javascript
actions, etc. will not happen. Be aware.
4. Be careful setting up the time. It's easy to want something running every
hour and have it run once a day instead.
> Hey guys, i want to set the CF administrator to schedule exution of
templates. Have you any experiences with that? Any problems or quirkiness?
I want to make sure that it processes those templates everytime
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
CFMail from CFMX may be send thousands mail at same time(Ben Forta)
Cheers
----- Original Message -----
From: "Robert Orlini" <rorlini@...>
Date: Fri, 5 Mar 2004 15:02:55 -0500
To: CF-Talk <cf-talk@...>
Subject: Infusion
Anyone out there using Infusion Mail Server for their CF apps as opposed to CFMail?
We want to create a email list of users that would be informed of the status of our website. I believe CFMail may have a problem with sending out more than 100 or 200 emails at a time.
I agree with Steven. It has been my experience with SQLServer that you have
to REPEAT THE COMPUTATION of the field in the ORDER BY clause.
Jevo
-----Original Message-----
From: DURETTE, STEVEN J (AIT) [mailto:sd1985@...]
Sent: Friday, March 05, 2004 10:44 AM
To: CF-Talk
Subject: RE: Ordering a query by a dynamic field
Les,
I believe it depends on the database. I have seen queries work this way on
some and break on others.
I think that the best way to do it would be to change your order by line to:
order by (69.1 * (longitude = 104.825814))
Steve
-----Original Message-----
From: Les Irvin [mailto:LJI_Lists@...]
Sent: Friday, March 05, 2004 1:37 PM
To: CF-Talk
Subject: Ordering a query by a dynamic field
Is it possible to order a query by a field produced within that same query?
This query fails at the "Order by" statement:
<CFQUERY NAME="Result" DATASOURCE="foo">
SELECT City,
State,
Username,
Longitude,
(69.1*(longitude - 104.825814) as distance
FROM personal
ORDER BY distance
</cfquery>
The "distance" field is (obviously) not a field in the table being queried.
This list is run on iMS. I wrote the entire mailing list, archives, etc.
around it. iMS rules!
As for CFMAIL, it should not have problems sending out a few hundred emails
as a time. I've done a few thousand at once with no problem and that was on
CF 5. CFMX is better.
> Anyone out there using Infusion Mail Server for their CF apps as opposed
to CFMail?
>
> We want to create a email list of users that would be informed of the
status of our website. I believe CFMail may have a problem with sending out
more than 100 or 200 emails at a time.
>
> Would this package help us?
>
> Robert O.
> HWW
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Hey guys, i want to set the CF administrator to schedule exution of templates. Have you any experiences with that? Any problems or quirkiness? I want to make sure that it processes those templates everytime
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
> Anyone out there using Infusion Mail Server for their CF apps
> as opposed to CFMail?
>
> We want to create a email list of users that would be
> informed of the status of our website. I believe CFMail may
> have a problem with sending out more than 100 or 200 emails at
> a time.
If you're using CFMX 6.1, you might just try it out before using an external
package, as CFMX 6.1 seems to be able to send mail pretty well. That said,
if you do want an external package, IMS has worked very well for me in the
past.
Anyone out there using Infusion Mail Server for their CF apps as opposed to CFMail?
We want to create a email list of users that would be informed of the status of our website. I believe CFMail may have a problem with sending out more than 100 or 200 emails at a time.
-----Original Message-----
From: Barney Boisvert [mailto:lists@...]
Sent: Friday, March 05, 2004 3:03 PM
To: CF-Talk
Subject: RE: web services question
Right now, you're creating a struct named 'myObj' containing two fields
(listID and memberStatus), then immediately overwriting it with your web
service object, then calling a method on the web service, failing to
pass in the required parameters
> -----Original Message-----
> From: Burns, John [mailto:john.burns@...]
> Sent: Friday, March 05, 2004 11:45 AM
> To: CF-Talk
> Subject: RE: web services question
>
> I changed it to make it so both arguments are required. Now, I have my
> call looking like this:
>
> <cfset myObj.listID = 4>
> <cfset myObj.memberStatus = 1>
> <cfset myObj =
> createObject("webservice","http://www.truthwebdesign.com/com/s
> iteManager
> /mailingList.cfc?wsdl")>
> <cfset lists = myObj.getMembers()>
> <cfdump var="#lists#">
>
>
> Now I get the error:
>
> Web service operation "getMembers" with parameters {} could not be
> found.
>
> The error occurred in /home/serve/truth/wstest.cfm: line 13
>
> 11 :
> 12 :
> 13 : <cfset lists = myObj.getMembers()>
> 14 : <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> 15 : <html>
>
> Am I missing something? Do I have to pass parameters in a different
> way when I'm calling this as a web service? Can I not do myObj.listID
> = 4 and have that get passed?
>
> John Burns
>
>
>
>
> -----Original Message-----
> From: Barney Boisvert [mailto:lists@...]
> Sent: Friday, March 05, 2004 1:15 PM
> To: CF-Talk
> Subject: RE: web services question
>
> You can't have optional parameters on web services.
>
> > -----Original Message-----
> > From: Burns, John [mailto:john.burns@...]
> > Sent: Friday, March 05, 2004 9:26 AM
> > To: CF-Talk
> > Subject: web services question
> >
> > Ok, I'm just now starting to use some web services from
> CFCs and I'm
> > running into some problems. Here's the deal:
> >
> > I have a CFC with 1 function in it called "getMembers" and it has 2
> > arguments. 1 is required the other is not. This works fine when I
> > call it as a CFC, however, when I call it as a web service,
> I get an
> > error.
> > The error just says "LISTID" and says to enable robust exception
> > errors.
> > I requested that my hosting company turn that on, but in
> the meantime,
>
> > I'm stuck. If I remove the arguments and just hardcode
> those values
> > into the CFC, I can call it as a webservice without a
> problem. Below
> > are code examples:
> >
> >
> > MAILINGLIST.CFC
> >
> > <cfcomponent>
> > <cffunction name="getMembers" access="remote" returntype="query">
> > <cfargument name="listID" displayname="listID" hint="The listID"
> > required="yes" type="numeric" default="4">
> > <cfargument name="memberStatus"
> displayname="memberStatus" hint="The
>
> > member status" required="no" type="numeric" default="1">
> > <cfquery datasource="global" name="addresses">
> > select MemberEmail as address
> > from EmailListMembers
> > where ListID = #arguments.listID# and MemberStatus =
> > #arguments.memberStatus#
> > </cfquery>
> > <cfreturn addresses>
> > </cffunction>
> > </cfcomponent>
> >
> > -----------------------------------------------------------
> > COMPONENTTEST.CFM
> >
> > <cfset myObj =
> > createObject("component","truth.com.siteManager.mailingList")>
> > <cfset MyObj.listID = 4>
> > <cfset addresses = myObj.getMembers()>
> >
> > <cfdump var="#addresses#">
> >
> > ---------------------------------------------------------
> > WEBSERVICETEST.CFM
> >
> > <cfset myObj =
> > createObject("webservice","http://www.truthwebdesign.com/com/s
> > iteManager
> > /mailingList.cfc?wsdl")>
> > <cfset myObj.listID = 4>
> > <cfset addresses = myObj.getMembers()>
> >
> > <cfdump var="#addresses#">
> >
> >
> > Any ideas? Also, if I try making the 2 arguments not required and
> > have defaults for them and remove the <cfset myObj.listID = 4> line
> > from the webservicetest.cfm file, I get an error that says "Web
> > service operation "getMembers" with parameters {} could not
> be found."
> >
> > Please help.
> >
> > John Burns
> >
> >
> >
>
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Right now, you're creating a struct named 'myObj' containing two fields
(listID and memberStatus), then immediately overwriting it with your web
service object, then calling a method on the web service, failing to pass in
the required parameters
> -----Original Message-----
> From: Burns, John [mailto:john.burns@...]
> Sent: Friday, March 05, 2004 11:45 AM
> To: CF-Talk
> Subject: RE: web services question
>
> I changed it to make it so both arguments are required. Now, I have my
> call looking like this:
>
> <cfset myObj.listID = 4>
> <cfset myObj.memberStatus = 1>
> <cfset myObj =
> createObject("webservice","http://www.truthwebdesign.com/com/s
> iteManager
> /mailingList.cfc?wsdl")>
> <cfset lists = myObj.getMembers()>
> <cfdump var="#lists#">
>
>
> Now I get the error:
>
> Web service operation "getMembers" with parameters {} could not be
> found.
>
> The error occurred in /home/serve/truth/wstest.cfm: line 13
>
> 11 :
> 12 :
> 13 : <cfset lists = myObj.getMembers()>
> 14 : <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> 15 : <html>
>
> Am I missing something? Do I have to pass parameters in a
> different way
> when I'm calling this as a web service? Can I not do myObj.listID = 4
> and have that get passed?
>
> John Burns
>
>
>
>
> -----Original Message-----
> From: Barney Boisvert [mailto:lists@...]
> Sent: Friday, March 05, 2004 1:15 PM
> To: CF-Talk
> Subject: RE: web services question
>
> You can't have optional parameters on web services.
>
> > -----Original Message-----
> > From: Burns, John [mailto:john.burns@...]
> > Sent: Friday, March 05, 2004 9:26 AM
> > To: CF-Talk
> > Subject: web services question
> >
> > Ok, I'm just now starting to use some web services from
> CFCs and I'm
> > running into some problems. Here's the deal:
> >
> > I have a CFC with 1 function in it called "getMembers" and it has 2
> > arguments. 1 is required the other is not. This works fine when I
> > call it as a CFC, however, when I call it as a web service,
> I get an
> > error.
> > The error just says "LISTID" and says to enable robust exception
> > errors.
> > I requested that my hosting company turn that on, but in
> the meantime,
>
> > I'm stuck. If I remove the arguments and just hardcode
> those values
> > into the CFC, I can call it as a webservice without a
> problem. Below
> > are code examples:
> >
> >
> > MAILINGLIST.CFC
> >
> > <cfcomponent>
> > <cffunction name="getMembers" access="remote" returntype="query">
> > <cfargument name="listID" displayname="listID" hint="The listID"
> > required="yes" type="numeric" default="4">
> > <cfargument name="memberStatus"
> displayname="memberStatus" hint="The
>
> > member status" required="no" type="numeric" default="1">
> > <cfquery datasource="global" name="addresses">
> > select MemberEmail as address
> > from EmailListMembers
> > where ListID = #arguments.listID# and MemberStatus =
> > #arguments.memberStatus#
> > </cfquery>
> > <cfreturn addresses>
> > </cffunction>
> > </cfcomponent>
> >
> > -----------------------------------------------------------
> > COMPONENTTEST.CFM
> >
> > <cfset myObj =
> > createObject("component","truth.com.siteManager.mailingList")>
> > <cfset MyObj.listID = 4>
> > <cfset addresses = myObj.getMembers()>
> >
> > <cfdump var="#addresses#">
> >
> > ---------------------------------------------------------
> > WEBSERVICETEST.CFM
> >
> > <cfset myObj =
> > createObject("webservice","http://www.truthwebdesign.com/com/s
> > iteManager
> > /mailingList.cfc?wsdl")>
> > <cfset myObj.listID = 4>
> > <cfset addresses = myObj.getMembers()>
> >
> > <cfdump var="#addresses#">
> >
> >
> > Any ideas? Also, if I try making the 2 arguments not required and
> > have defaults for them and remove the <cfset myObj.listID = 4> line
> > from the webservicetest.cfm file, I get an error that says "Web
> > service operation "getMembers" with parameters {} could not
> be found."
> >
> > Please help.
> >
> > John Burns
> >
> >
> >
>
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]