RE: what tag captures data from a web page?

2002-11-04 Thread Gene Kraybill
cfhttp... and then work with the resulting variable, cfhttp.filecontent.

Gene Kraybill

-Original Message-
From: Ed Gordon [mailto:NetDr;callptc.com]
Sent: Monday, November 04, 2002 10:49 AM
To: CF-Talk
Subject: what tag captures data from a web page?


If you would, please direct me to what tag or tags (or function) I should
look at in order to capture data from an existing internet web page.

TIA

Ed Gordon

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com



RE: Performance Tweaking - Friday Morning Brain Fart

2002-11-01 Thread Gene Kraybill
Yup, it was introduced in 5.0...

Gene

-Original Message-
From: Ciliotta, Mario [mailto:mario.ciliotta;csfb.com]
Sent: Friday, November 01, 2002 1:46 PM
To: CF-Talk
Subject: RE: Performance Tweaking - Friday Morning Brain Fart


Hi all,

Hate to ask this question, but is savecontent a 5.0 and above tag.  I am still in the 
4.5 world, starting to migrate  to MX.

Mario

-Original Message-
From: Mark A. Kruger - CFG [mailto:mkruger;cfwebtools.com]
Sent: Friday, November 01, 2002 12:06 PM
To: CF-Talk
Subject: RE: Performance Tweaking - Friday Morning Brain Fart


if it's exactly the same output (html output), then you could use
cfsavecontent. Sytax is:

cfsavecontent variable=MySelectbox
select name=blah

option value=1 blah 1/option
option value=2 blah 2/option
option value=2 blah 1/option
/select

/cfsavecontent


Watch out for cfsetting enablecfoutputonly=yes .  If you have set this,
the  cfcontent will only trap whatever is between output tags.  It basically
traps the output buffer from the point of the call. To use the variable,
simply output it to the page:

form method=post action=thispage.cfm

Cfoutput#mySelectbox#/cfoutput

/form

It's always a string.

One way I've used this in the past is in dynamically generating an HTML
email that includes some stock quotes or charts etc.  Build it once, then
use it ina query driven email over and over again.  It works well.

-mk



-Original Message-
From: Ian Lurie [mailto:ian;portentinteractive.com]
Sent: Friday, November 01, 2002 10:29 AM
To: CF-Talk
Subject: Performance Tweaking - Friday Morning Brain Fart


Hi all,

I've done this before but am having a post-halloween party moment:

1. I have a chunk of code that generates a drop-down menu. The menu's used
again and again on a page.

2. I want to generate that code once, insert it into a variable, and then
reuse it. That'll shave a LOT of time off the page execution time.

I dimly remember an article by Ben Forta (I think) about this - can someone
refresh my sugar-addled brain?

Thanks,

Ian

--
Portent Interactive
Effective web sites through Conversation Marketing 
http://www.portentinteractive.com




~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm



Authentication issue

2002-11-01 Thread Gene Kraybill
Scenario:

An organization will be migrating a large number of workstations from an NT domain to 
a Win2000/AD domain, over a period of 4 to 6 months. NT administrators do not want to 
establish a trust to enable authentication across multiple domains. 

Is there a way, perhaps using the new facilities in CFMX, that would allow the use of 
Windows integrated authentication on an intranet throughout such a dual-domain 
transition?

Gene
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm



RE: SQL Query Results

2002-10-28 Thread Gene Kraybill
If I understand your intention correctly:

WHERE s1_trainer1 = #client.id#
OR s1_trainer2 = #client.id#
OR s1_trainer3 = #client.id# 
OR ... 

Gene K.

-Original Message-
From: Jillian Carroll [mailto:jillian;koskie.com]
Sent: Monday, October 28, 2002 2:14 PM
To: CF-Talk
Subject: SOT: SQL Query Results


How can I adjust the following query so that it checks every trainer
(s1_trainer1, s1_trainer2, etc.) for a match to #client.id# without having
to do 10 queries?

cfquery name=courses datasource=#DSN#
SELECT id, type, other, city, prov, s1_startdate, s1_trainer1, s1_trainer2,
s1_trainer3, s1_trainer4, s1_trainer5, s2_trainer1, s2_trainer2,
s2_trainer3, s2_trainer4, s2_trainer5
FROM courses
WHERE s1_trainer1 = #client.id#
ORDER BY s1_startdate DESC
/cfquery


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.



RE: SQL Query Results

2002-10-28 Thread Gene Kraybill
Please clarify exactly what you want to retrieve...

Gene

-Original Message-
From: Jillian Carroll [mailto:jillian;koskie.com]
Sent: Monday, October 28, 2002 2:34 PM
To: CF-Talk
Subject: RE: SQL Query Results


If I use 'OR', won't it stop evaluating once it finds a match?

-Original Message-
From: Gene Kraybill [mailto:Gene.Kraybill;adelphia.com]
Sent: Monday, October 28, 2002 1:26 PM
To: CF-Talk
Subject: RE: SQL Query Results


If I understand your intention correctly:

WHERE s1_trainer1 = #client.id#
OR s1_trainer2 = #client.id#
OR s1_trainer3 = #client.id#
OR ...

Gene K.

-Original Message-
From: Jillian Carroll [mailto:jillian;koskie.com]
Sent: Monday, October 28, 2002 2:14 PM
To: CF-Talk
Subject: SOT: SQL Query Results


How can I adjust the following query so that it checks every trainer
(s1_trainer1, s1_trainer2, etc.) for a match to #client.id# without having
to do 10 queries?

cfquery name=courses datasource=#DSN#
SELECT id, type, other, city, prov, s1_startdate, s1_trainer1, s1_trainer2,
s1_trainer3, s1_trainer4, s1_trainer5, s2_trainer1, s2_trainer2,
s2_trainer3, s2_trainer4, s2_trainer5
FROM courses
WHERE s1_trainer1 = #client.id#
ORDER BY s1_startdate DESC
/cfquery




~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com



RE: OT js question (child window passing back to parent)

2002-10-18 Thread Gene Kraybill
Looks like you may have mis-referenced your child form name -- it's actually
actionCode not actionReason.

Gene


-Original Message-
From: Tim Do [mailto:TDo;lahd.lacity.org]

SNIP

Parent Window:

FORM NAME=newCaseInfo
ACTION=index.cfm?action=caseAnalysissubaction=createNewCase METHOD=POST
onSubmit=return validateUnits();

Form that I'm trying to populate with Child window data:
INPUT TYPE=text NAME=actionReason VALUE= SIZE=5nbsp;nbsp;A
HREF=javascript:openFrameless2() CLASS=text9ptBlackCodes/A


Child Window:

SCRIPT LANGUAGE=JavaScript
function passToParent()
{
window.opener.document.newCaseInfo.actionReason.value =
document.actionReason.actionReasonCode.value;
return false;
window.close();
}
/SCRIPT

FORM NAME=actionCode
ACTION=index.cfm?action=caseAnalysissubaction=createNewCase METHOD=POST
onSubmit=return passToParent();

INPUT TYPE=checkbox NAME=actionReasonCode VALUE=#actionReasonCode#

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm



Poll

2002-10-14 Thread Gene Kraybill

Someone (sorry, I deleted the msg) was asking about a poll. Here's a
freeware one on Dev Ex...

http://devex.macromedia.com/developer/gallery/info.cfm?ID=6A948CFB-C9E9-11D6
-840900508B94F380method=Full

Gene

-Original Message-
From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 14, 2002 3:28 PM
To: CF-Talk
Subject: Re: Client Variable Storage and SQL Server


Yep, afaik CF ( at least prior to MX ) hits the db for each reference to
those client variables... If you're concerned about the overhead, you could
copy all your client variables to the request scope at the top of the page,
i.e. in your application.cfm and then use the request variables instead...

cfloop index=x list=#getclientvariableslist()#
cfset request[c_#x#] = evaluate(client.#x#)/cfloop

Once you've got this in your application.cfm a multi-file regex or two on
your development directory should get the rest of the app in line with this
structure...

If you use lots and lots of client variables or have many pages on which
they are not used, however, this might wind up being less efficient than
simply using them normally the way you are now, since this would copy all
your client variables to the request scope whether they're used on a page or
not.

The other alternative of course, is to simply manually optimize each page by
copying any client variables which are used more than once on that page into
the request scope at the top, thereby grabbing only the data that page will
need.

My own applications only reference them once or twice on a given page, so I
don't worry terribly much about their management or overhead.


hth

S. Isaac Dealey
Certified Advanced ColdFusion 5 Developer

www.turnkey.to
954-776-0046


 We are using SQL Server to manage our client variables and I've noticed
 that
 a majority of the SQL commands hitting our server are from Cold Fusion
 managing client variables.  Has anyone else noticed this type of activity?
 Just a simple trace in SQL Profiler revealed statements like:

 SELECT data FROM CGLOBAL WHERE cfid = @P1

 or

 exec sp_executesql N'SELECT data FROM CGLOBAL WHERE cfid = @P1', N'@P1
 char(13)', '4858:66043525'


 I haven't measured this in terms of performance, but I imagine it has to
 take some toll on our server.  Is this the best way to go or should I try
 something else?


 Thanks in advance,
 Andy
 

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com



RE: Multiple filters on cfdirectory

2002-10-11 Thread Gene Kraybill

If you really needed the results in a single query, you could retrieve ALL
the files and then do a query of a query using a condition like this:

WHERE Name LIKE '%.gif'
AND Name LIKE '%.jpg' 

or possibly run cfdirectory twice - once for each extension - and use the
query functions to merge the two result sets...

Gene Kraybill

-Original Message-
From: Randell B Adkins [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 11, 2002 3:46 PM
To: CF-Talk
Subject: Re: Multiple filters on cfdirectory


Only one filter can be applied.

You can do a check on the extension of the file and if it does not
match your criteria, do nothing, else display the file name and such.



 [EMAIL PROTECTED] 10/11/02 02:38PM 
Is there a way to achieve the following (multiple filters), it does
not
seem to work this way:
 
cfdirectory action=LIST directory=#GetFullDir# name=ImgList
filter=*.gif, *.jpg sort=Name, Type
 
TIA,
Scott



~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm



RE: Please clarify behaviour of listContainsNoCase

2002-10-10 Thread Gene Kraybill

ListFindNoCase will look at each list item as a whole...

Gene Kraybill

-Original Message-
From: Kola Oyedeji [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 10, 2002 12:41 PM
To: CF-Talk
Subject: Please clarify behaviour of listContainsNoCase


Can someone confirm to me that this is the correct behaviour for
listcontainsNoCase:

cfscript
   if( listContainsNoCase(MRS,MS,MISS, mr  , , )) {
gender = F;
   } else {
gender = m;
   }
/cfscript

cfoutput#gender#/cfoutput

returns F, if I change the first entry in the list to MZ, M gets
outputted.
I'm assuming this is because MRS contains 'MR' however I thought the
whole point of having a listcontainsNocase function (as opposed to using
contains() ) was that the function would look at each entry as a whole?

Thanks

Kola



~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.



CFMAIL with relaying off

2002-10-08 Thread Gene Kraybill

Has anyone successfully used CFMAIL with an Exc 2000 SMTP server, when SMTP
relaying is prohibited? Adding the IP of the web server to the exception
list in the SMTP service doesn't seem to work, as I still get relaying
errors on external mail. And CFMAIL doesn't have username/pwd parameters...

Gene Kraybill
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm



CFCACHE vs. static HTML

2001-10-25 Thread kraybill

Should there be any performance differences between viewing a 
page that uses CFCACHE vs. viewing the same page output in a 
static HTML file created manually?

I thought NOT, but some tests I've run suggest otherwise.

For example, dynamic cfm pages that consistently require 10 
seconds for full display will display in 8.5 seconds when using 
CFCACHE. But when I manually save that output to an HTML file 
and view that, the page is fully displayed in 5 or 6 seconds. 
Changing my manual static file to a .cfm extension adds a second 
or so, but it's still faster than using CFCACHE.

I'm basing my tests on repeated hits of the Refresh button, so I 
don't think it's a browser cache issue...

~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Group By..

2001-08-24 Thread kraybill

To expand a bit on the use of CFOUTPUT GROUP=...

This allows the use of an internal nested CFOUTPUT to display 
items within a group.

For example, if you have a recordset with records describing your 
CD collection. One field in each record may indicate whether the 
CD is country, pop, classical etc. You can use the GROUP 
parameter in the CFOUTPUT, and then use a nested CFOUTPUT, 
to create a report grouping the CDs by music type. For example:

CFOUTPUT QUERY=GetCDInfo GROUP=MusicType
#GetCDInfo.MusicType#
CFOUTPUT
#GetCDInfo.CDTitle#
/CFOUTPUT
/CFOUTPUT

For this to work, you must use ORDER BY in your SQL statement, 
ordering by the same field that you want to GROUP by in  your 
CFOUTPUT. (The GROUP in SQL has no relation to the GROUP in 
CFOUTPUT.)

There may also be times when you have generated a record set 
similar to the above and then simply want to list the types of music 
held in your collection. Rather than hitting the DB again, you can 
simply use a CFOUTPUT GROUP without the nested CFOUTPUT, 
to display the types without duplication.

Gene Kraybill

On 24 Aug 2001, at 8:58, Bruce Sorge wrote:

 When you use aggregate functions in the SELECT clause to produce summary
 information, you use the GROUP BY clause to divide the information into
 distinct groups. Your database system uses any column or lost of columns
 following the GROUP BY keywords as grouping columns. It is an optional
 clause.
 
 The CFOUTPUT is a way to group output. The GROUP parameter eliminates
 duplicates in the case where data is sorted by the specified fields.
 
 
 - Original Message -
 From: Jeffry Houser [EMAIL PROTECTED]
 To: CF-Talk [EMAIL PROTECTED]
 Sent: Friday, August 24, 2001 11:43 AM
 Subject: Group By..
 
 
 
This is one thing that has always escaped my understanding, and I had
 the
  sudden urge to ask.
 
What is Group By.  How is Group By used?  What is it used for?  ( both
 in
  SQL Statements and the group attribute in the CFOUTPUT tag )
 
Anyone want to take a minute and attempt to explain it to me?
 
 
  --
  Jeffry Houser | mailto:[EMAIL PROTECTED]
  AIM: Reboog711  | ICQ: 5246969 | Phone: 860-229-2781
  --
  I'm looking for a room-mate in the Hartford CT area, starting in August
  --
  Instant ColdFusion 5.0  | ISBN: 0-07-213238-8
  http://www.instantcoldfusion.com
  --
  DotComIt, LLC
  database driven web data using ColdFusion, Lotus Notes/Domino
  --
  Far Cry Fly, Alternative Folk Rock
  http://www.farcryfly.com | http://www.mp3.com/FarCryFly
  --
  Change is good
 
 
 

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



CFMAIL in a nested CFOUTPUT

2001-08-09 Thread kraybill

Has anyone figured out a way to prevent CFMAIL from behaving 
like a set of CFOUTPUT tags when it's inside a CFOUTPUT 
GROUP construct?

Consider this greatly simplified code:

CFOUTPUT QUERY=MyQuery GROUP=Email
CFOUTPUT
some code here for building the content of the email 
message...
/CFOUTPUT
CFMAIL
my message
/CFMAIL
/CFOUTPUT

It seems that the CFMAIL behaves the same as the simple nested 
CFOUTPUT, i.e., it iterates as an inner loop nested inside the 
CFOUTPUT GROUP, resulting in multiple messages when I only 
want it to send ONE.

I can't use the CFMAIL with a QUERY and GROUP parameter, 
instead of the outer CFOUTPUT, because I need to build the email 
message first with some processing within the inner CFOUTPUT.

Only workaround I've heard of is to build an array within the 
CFOUTPUT, then iterate through that outside the CFOUTPUT. If 
so, it seems like CFMAIL definitely needs a parameter to specify 
whether it loops or simply does a simple send when inside a 
CFOUTPUT GROUP

Ideas?

Gene Kraybill

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Session timeouts

2001-08-08 Thread kraybill

What's the best way to deal with session timeouts when using 
session vars to grant access to administrative areas of a site on a 
server where you don't have control of the timeout settings?

I'm thinking we probably need to switch to another method of 
tracking the session... I'm reluctant to move to client vars in the db, 
but is that what will be necessary? What happens now is an 
administrator may be, say, creating a newsletter and by the time 
he composes it and saves it, the session has timed out and he's 
kicked back to the login screen...

Ideas welcomed...

Gene Kraybill



~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Any CF 5 hosts out there

2001-07-22 Thread kraybill

We have had excellent performance from Crystaltech.com, based 
in Arizona. CF5, 24/7 phone support, web-based admin center to 
set up own DSNs, lowcost SQL Server, close attention to server 
overload issues, etc...

No connection, just a happy customer...

Gene Kraybill
LPW  Associates

On 21 Jul 2001, at 17:18, Dick Applebaum wrote:

 I have a new client that will be moving to CF from Perl (subset).
 
 I would like to move him to CF 5 if it is reliable and I can find a CF5 host.
 
 Comments, suggestions.
 
 TIA
 
 Dick
 

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: dynamic vars, error checking and values (sorry, long and complex)

2001-07-22 Thread kraybill

John,

See if this helps... One method (often used in Fusebox apps) for 
forms is to set up three loops to initialize your variables. You 
normally start out with a fieldlist:

CFSET fieldlist=field1, field2, field3 etc.

If you're naming your fields dynamically, you'll need to build that 
fieldlist dynamically, using loops or similar methods. Maybe 
something like this:

CFSET fieldlist=
CFOUTPUT Query=MyQuery
CFSET 
field#currentrow#=#categoryName#__#categoryID#__#categoryD
ataType#
CFSET fieldlist=ListAppend(fieldlist,field#currentrow#)
/CFOUTPUT

Then you have 3 loops to initialize your vars depending on whether 
the user is coming to the form for the first time (new), for editing 
of an existing record (query) or for tweaking of a just-submitted 
form that failed some validation test (form).

if it's a New use:

CFLOOP INDEX=fieldname LIST=#fieldlist#
CFSET TEMP = SETVARIABLE(#fieldname#,)
/CFLOOP

if it's a Query use:

CFLOOP INDEX=fieldname LIST=#fieldlist#
CFSET 
TEMP=SETVARIABLE(#fieldname#,#evaluate(QueryName.#f
ieldname#)#)
/CFLOOP

if it's a form use:

CFLOOP INDEX=field LIST=#ListRest(fieldlist)#
CFSET TEMP = SETVARIABLE(#field#, #evaluate(form. 
 #field#)#)
/CFLOOP

You'll need to add some conditional code to determine which of the 
three uses it is. In the Fusebox method, you'd set a flag in the 
main index.cfm file, but if you're not using Fusebox, you could 
simply test for the existence of the primary key or something like 
that.

This method sets the basic field name itself to the appropriate 
value, based on whether it's a new, query or form use... So 
you set the form field values like this:

INPUT TYPE=text NAME=field1 VALUE=#field1#

I'm sure this approach will need to be tweaked depending on how 
you're actually creating your dynamic field names, but hopefully it'll 
help.

Gene Kraybill

On 21 Jul 2001, at 21:19, John Barleycorn wrote:

 hello, i've been working on this problem for a few days and i'm not having 
 any luck solving it so i was hoping someone could help.
 
 i'm creating form fields from a query so i have dynamically created vars 
 that are passed to my next page. on the next page the vars are checked and 
 if there is an error in input then a message is logged, the original form 
 page included and then the message is displayed. trouble is, i need to put 
 the values that the user entered back in the form fields. i can't seem to do 
 this because i have to find variables based on dynamically generated data. 
 Has anyone done this before and if so, can you tell me the best way to do 
 this. also note that my form names are a concatenation of three variables 
 (category table: categoryName__categoryID__categoryDataType) this info needs 
 to be passed to the processing page so i have to name them this way. Not 
 sure if that throws a wrench in anyone's solution. If anyone can guide me 
 i'd appreciate it. I've already exausted my knowlege. Thanks.
 
 newbie

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



OT: SQL for parent/child

2001-07-22 Thread kraybill

Seems like this should be easy, but I can't think how to construct 
a query that will grab the name of a parent category in the following 
situation...

My category table consists of:
CategoryID
CategoryName
ParentCategoryID

If a category has a parent, ParentCategoryID carries the ID of the 
parent. If it doesn't, ParentCategory = 0.

I'm trying to create a single query listing all the categories, and 
ALSO including a query column called ParentCategoryName, 
containing the name of the parent if that category has one. Could 
do it easily if the info were in 2 tables, but not sure how when all 
the info is in 1 table...

Gene Kraybill



~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Love CF, what about CFFLUSH?

2001-07-16 Thread kraybill

Works well for me in some initial use... Certainly gives the 
perception of a more responsive system. 

One thing to keep in mind, of course, is that CFFLUSH won't help if 
your output is contained within a single HTML table for formatting 
purposes. In one case where I had been using such a table to 
define a nav menu at the left and the main content area to the right, 
I've added some conditional code to my CFINCLUDEd header and 
footer code so the user has the option of switching to a horizontal 
layout. This puts the menu at the top of the page and CFFLUSH 
can freely do its thing on the page output without the use of a 
single large container HTML table and its associated output 
issues. Guess I could have used frames to accomplish the same 
thing...

Gene Kraybill

On 16 Jul 2001, at 19:12, Michael Lugassy wrote:

 I just finish one heck of a Photo Share mechanisem with CF 4.5 in JUST 2 weeks! :)))
 Databases, Images, thumbnails, subscriptions, http calls, everything! but one thing
 IS DEFINITLY MISSING - the new CFFLUSH tag.
 
 I wanted to ask how well does it perfom?
 My site need sometime to make extensive calculations and manipulation before
 showing the final page. this may take some time a bit.
 will the CFFLUSH help to show the page, part by part? so users won't click STOP and 
vanish??
 
 Thanks,
 
 Michael Lugassy
 
 VAMP Photo Share!
 http://www.imvamp.com/photoshare/index.htm
 Serving all of your media needs.
 
 
 
 
 
 

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Place holder

2001-07-13 Thread kraybill

On your update template, use CFPARAM for any field that may in 
some cases be missing... Or, on the original display page, you 
could use hidden fields for the boxes  you don't want to show...

Gene Kraybill 

On 13 Jul 2001, at 8:43, Janine Jakim wrote:

 I have a display page that shows select boxes/input boxes. Depending on the
 subject will depend on if they should fill the box. I have set it so they
 don't see a box if the field should not be filled in.
 Problem: On submit an update query is run. My query doesn't like blanks
 (loop list update query) and fills in the blanks with the field value of the
 next field.
 So this: A ___Becomes: A 12
  B 12  B 19
  C 19  C 3
  D 3   D
 I fixed the problem by adding a select box with no options and puts a . in
 the database as a placeholder. But that is ugly and the user must tab
 to/from the field even if the field is useless to them.  Any suggestions.  I
 think the answer is easy, but it's one of those days that I left my brain at
 home with my gourmet coffee
 Thanks for all/any help
 j
 
 
 
 
 

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: CFFlush and GetTickCount

2001-07-08 Thread kraybill

Sorry, mea culpa. Just realized my formula should have divided by 
1000. Suddenly the ticks work again g ...

Gene Kraybill

#Evaluate((EndPageRequest-StartPageRequest)/100)#

On 6 Jul 2001, at 9:21, [EMAIL PROTECTED] wrote:

 Is there a way of using these two tags together on the same page 
 and still get accurate Tick results?
 
 Gene Kraybill 
 
 On 4 Jul 2001, at 10:02, Craig Dudley wrote:
 
  It's probably adding the tick counts together for each interval of the
  cfflush
  
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: 03 July 2001 00:35
  To: CF-Talk
  Subject: CFFlush and GetTickCount
  
  
  I'm seeing some strange timing reports when I use GetTickCount 
  and CFFlush together... Is this a feature or a bug g?
  
  I have this at the start of a page:
  CFSET StartPageRequest=GetTickCount()
  
  I have this at the end:
  CFSET EndPageRequest=GetTickCount()
  
  To calculate the time it takes to generate the page, I use this:
  #Evaluate((EndPageRequest-StartPageRequest)/100)#
  
  When I don't use CFFLUSH on the page, the page generation time 
  is reported at between 5 and 6 seconds.
  
  When I do use CFFLUSH, although there is a slight reduction in 
  the delay before the page begins to appear, the page generation 
  time reported by the GetTickCount calculation is much more than 
  the actual time. For example, a page that is generated and fully 
  received by the browser in 13 seconds shows a GetTickCount 
  interval of 41 seconds!
  
  Does this mean GetTickCount is never accurate when used within 
  the same page request as CFFlush?
  
  Gene Kraybill
 

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: CFFlush and GetTickCount

2001-07-06 Thread kraybill

Is there a way of using these two tags together on the same page 
and still get accurate Tick results?

Gene Kraybill 

On 4 Jul 2001, at 10:02, Craig Dudley wrote:

 It's probably adding the tick counts together for each interval of the
 cfflush
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: 03 July 2001 00:35
 To: CF-Talk
 Subject: CFFlush and GetTickCount
 
 
 I'm seeing some strange timing reports when I use GetTickCount 
 and CFFlush together... Is this a feature or a bug g?
 
 I have this at the start of a page:
 CFSET StartPageRequest=GetTickCount()
 
 I have this at the end:
 CFSET EndPageRequest=GetTickCount()
 
 To calculate the time it takes to generate the page, I use this:
 #Evaluate((EndPageRequest-StartPageRequest)/100)#
 
 When I don't use CFFLUSH on the page, the page generation time 
 is reported at between 5 and 6 seconds.
 
 When I do use CFFLUSH, although there is a slight reduction in 
 the delay before the page begins to appear, the page generation 
 time reported by the GetTickCount calculation is much more than 
 the actual time. For example, a page that is generated and fully 
 received by the browser in 13 seconds shows a GetTickCount 
 interval of 41 seconds!
 
 Does this mean GetTickCount is never accurate when used within 
 the same page request as CFFlush?
 
 Gene Kraybill

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: REQUEST vs. VARIABLES

2001-07-05 Thread kraybill

The Request scope was added to CF mainly to allow variables to 
be easily passed to custom tags. 

The only two differences I can think of between Request.var and 
Variables.var is that Request.var is accessible within all custom 
tags called within the same request, and Variables.var can be used 
without a scope since CF first looks in the Variables scope if a var 
has no specified scope. Probably not much else to say about 
Request scope, except that it can be very handy...

Gene Kraybill

..var available t
On 5 Jul 2001, at 5:25, Hamid Hossain wrote:

 Hi folks,
 
 I noticed that REQUEST scoped variables are availabe
 within CustomTags while VARIABLES scoped are not.
 
 I thought that REQUEST and VARIABLES are the same as
 you can use your name as a scope ;)
 
 I am wondering if there is a documentation on REQUEST
 scope variables.
 
 Thanx
 Hamid Hossain
 Certified ColdFusion Developer

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Verity Problem (solved)

2001-07-05 Thread kraybill

SIGHS Type=Great Rejoicing
Well, I finally figgered out the cause of my Verity problem.
/SIGHS

When you set TYPE=File in CFINDEX, the filename you use for 
the KEY must apparently be fully qualified with the path as well. 
My app is actually working now, but I have little hair left. g

The docs, I feel, are misleading. Although they say the KEY is the 
fully qualified path when TYPE=Path, they simply say the KEY 
is Document filename when TYPE=File. The fact that fully 
qualified was used in referring to the Path type but not the File 
type made me conclude, incorrectly, that the filename did not need 
to be fully qualified. I had specified the path in the URLPATH 
parameter, so incorrectly thought that would suffice.

What made things so confusing was that I had discovered by 
accident that if I ran one CFINDEX using Type=Path, I could then 
use a CFINDEX where Type=File. Apparently the fully qualified path 
I specified in KEY when I ran the CFINDEX with TYPE=Path 
switched the internal default path for Verity. I was just about ready 
to throw out Verity as a quirky engine that didn't work. What a relief 
to discover that the world actually works again g...

Gene Kraybill

On 4 Jul 2001, at 23:35, [EMAIL PROTECTED] wrote:

 I have an application that uses three Verity collections. I can 
 successfully create the first collection and retrieve info from it, and 
 can then do the same with the second collection. However, when I 
 go back and do an update on the first collection, 2 error 
 messages like the following are generated in file/sysinfo.log for each page I 
attempt to add:
 
 Start of error --
 Error   E3-0422 (VDK 2): Could not find file Page_338.htm
 
 Error   E3-0032 (VDK): No valid documents found in 
 C:\WINNT\CFI70CB.tmp for collection 
 E:\Web\worldwideguide\guides\verity\Guide_2_Pages\file
 End of Error --
 
 The contents of this update also do not show up in searches.
 
 This is my CFINDEX:
 
 CFINDEX collection=#ThisCollection#
   action=Update
   type=File
   key=Page_#ThisPageID#.htm
   CUSTOM1=#ThisPageURL#
   CUSTOM2=#ThisPageID#
   extensions=.htm
   language=English 
 
 Once this error occurs with a collection, I discovered that the only 
 way I can correct it is to run the following code, taken in 
 desperation from some sample CF code:
 
 CFINDEX 
   collection=#ThisCollection#
 action=Refresh
 type=PATH
 key=#IndexDirectory#\
 extensions=#IndexExtensions#
 recurse=#IndexRecurse#
 language=#IndexLanguage#
 urlPath=#URLPath#\verity\Guide#Dev#_#GuideID#_PageLinks
 
 Once I run the sample code, which does a PATH indexing 
 operation rather than a FILE operation, I can then re-run the first 
 CFINDEX and repopulate my collection (via a loop, file by file). The 
 first CFINDEX does NOT have the same corrective effect, even if I 
 change it to a Refresh rather than an Update.
 
 I've tried deleting, purging, repairing and optimizing, all to no avail. 
 The only thing that seems to work is running the PATH-based 
 refresh, then going back to my initial FILE-based indexing within a 
 loop. The problem with that, of course, is that each time I must 
 complete rebuild the collection, which will NOT be practical in the 
 application I'm building.
 
 Any ideas greatly appreciated...
 
 Gene Kraybill
 LPW  Associates LLC
 Mansfield, PA
 

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Verity Problem

2001-07-04 Thread kraybill

This is a repost -- can someone help?

I have an application that uses three Verity collections. I can 
successfully create the first collection and retrieve info from it, and 
can then do the same with the second collection. However, when I 
go back and do an update on the first collection, 2 error 
messages like the following are generated in file/sysinfo.log for each page I attempt 
to add:

Start of error --
Error   E3-0422 (VDK 2): Could not find file Page_338.htm

Error   E3-0032 (VDK): No valid documents found in 
C:\WINNT\CFI70CB.tmp for collection 
E:\Web\worldwideguide\guides\verity\Guide_2_Pages\file
End of Error --

The contents of this update also do not show up in searches.

This is my CFINDEX:

CFINDEX collection=#ThisCollection#
action=Update
type=File
key=Page_#ThisPageID#.htm
CUSTOM1=#ThisPageURL#
CUSTOM2=#ThisPageID#
extensions=.htm
language=English 

Once this error occurs with a collection, I discovered that the only 
way I can correct it is to run the following code, taken in 
desperation from some sample CF code:

CFINDEX 
collection=#ThisCollection#
action=Refresh
type=PATH
key=#IndexDirectory#\
extensions=#IndexExtensions#
recurse=#IndexRecurse#
language=#IndexLanguage#  
urlPath=#URLPath#\verity\Guide#Dev#_#GuideID#_PageLinks

Once I run the sample code, which does a PATH indexing 
operation rather than a FILE operation, I can then re-run the first 
CFINDEX and repopulate my collection (via a loop, file by file). The 
first CFINDEX does NOT have the same corrective effect, even if I 
change it to a Refresh rather than an Update.

I've tried deleting, purging, repairing and optimizing, all to no avail. 
The only thing that seems to work is running the PATH-based 
refresh, then going back to my initial FILE-based indexing within a 
loop. The problem with that, of course, is that each time I must 
complete rebuild the collection, which will NOT be practical in the 
application I'm building.

This code is for a little spider-type search engine, which retrieves 
external Web pages via CFHTTP, saves each page temporarily for 
indexing, then replaces the contents of the file with a single line 
META redirect. Seems to work great for the files that actually get 
indexed, but whenever I move to another collection to index pages 
and then return to the first, the new additions to the first collection 
simply don't show up in searches and the errors shown above are 
recorded in the logs. 

I wondered if somehow Verity was balking because the original 
contents are replaced with the redirect, but I see the same problem 
even if I retain the original contents in the file that is indexed. I'm 
obviously doing something wrong...

One other thing: Doing a Purge always deletes ALL the data from 
the collection. Isn't that supposed to only remove data that has 
been marked for deletion? 

Any ideas greatly appreciated...

Gene Kraybill
LPW  Associates LLC
Mansfield, PA

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



CFFlush and GetTickCount

2001-07-03 Thread kraybill

I'm seeing some strange timing reports when I use GetTickCount 
and CFFlush together... Is this a feature or a bug g?

I have this at the start of a page:
CFSET StartPageRequest=GetTickCount()

I have this at the end:
CFSET EndPageRequest=GetTickCount()

To calculate the time it takes to generate the page, I use this:
#Evaluate((EndPageRequest-StartPageRequest)/100)#

When I don't use CFFLUSH on the page, the page generation time 
is reported at between 5 and 6 seconds.

When I do use CFFLUSH, although there is a slight reduction in 
the delay before the page begins to appear, the page generation 
time reported by the GetTickCount calculation is much more than 
the actual time. For example, a page that is generated and fully 
received by the browser in 13 seconds shows a GetTickCount 
interval of 41 seconds!

Does this mean GetTickCount is never accurate when used within 
the same page request as CFFlush?

Gene Kraybill

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Duplicate name conflict error message

2001-06-23 Thread kraybill

You may be better off to name the property fields property1, 
property2, property3, etc., then apply the validation as required.

If there's a possibility of more than 3 properties, you might consider 
asking a question at the beginning about how many properties 
they'd like to insure. Then post the form back to itself, reading the 
response and using that number as the control for a loop 
something like this:

CFPARAM NAME=NumberOfProperties DEFAULT=1
CFIF IsDefined(Form.NumberOfProperties)
CFSET NumberOfProperties=Form.NumberOfProperties
/CFIF
CFLOOP INDEX=i FROM=1 TO=#NumberOfProperties#
INPUT TYPE=text NAME=Property#i#
/CFLOOP

Gene Kraybill

On 22 Jun 2001, at 11:30, [EMAIL PROTECTED] wrote:

 Thanks for the response. You're right.  The problem actually is that I have
 more than one
 field in the form with the same name.  The reason for this is that the form
 allows users to apply for insurance to cover their property or properties.
 As an applicant may have more than one property to be insured,  I've
 repeated the code in that part of the form dealing with property details
 three times, hence the repeat occurrance of fieldnames.
 
 At first, I only used the input and form tags.  However, because I
 needed to flag the first occurrance of the various property fields as
 required, I changed these to cfinput and cfform tags, but thereby ran
 into the problem that CF doesn't allow for repeated fieldnames (and I
 couldn't flag any of these fields as 'required' or 'no null allowed' in
 Access, since that would cause an error if an applicant had only one or two
 properties to be insured, and so left any of the repeated part of the form
 blank).
 
 Here is what I need to do:
 1.  I need to be able to allow users of my form to enter in details of
 anywhere from one to three properties, either by repeating the form code or
 by some other device of which I'm presently unaware, at the same time.
 2.  I need to be able to make the fields, in the first instance of the part
 of the form dealing with property details, required fields, but not any of
 the other instances.
 
 I'd appreciate any advice.
 
 Hubert
 
 ---
 Hubert Earl
 
 ICQ#: 16199853
 
 My Jamaican Art, Craft  More Online Store:
 http://www.angelfire.com/ny/hearl/link_page_for_go_jamaica.html
 Check out the art print bargains available! Beautiful prints as low as
 US$7.50 each, less if you purchase 2 or more. Also being sold:  the
 Genealogy of Jamaica CD-ROM
 
 
 - Original Message -
 From: James Taavon [EMAIL PROTECTED]
 To: CF-Talk [EMAIL PROTECTED]
 Sent: Thursday, June 21, 2001 3:16 PM
 Subject: Re: Duplicate name conflict error message
 
 
 
  It is probably because you have two form elements with the same name.
  Hope that helps.
 
 
 
 
  [EMAIL PROTECTED] wrote:
  
   Hi,
  
   I'm getting a 'Duplicate name conflict' error message.  I'm unable to
 solve it, because the code in which it is appearing is over 1,000 lines
 long.  Also, the error message states:
   The error occurred while processing an element with a general
 identifier of (CFINPUT), occupying document position (380:1) to (381:39).
  
   This doesn't help me, because line 280 contains only the code /TR and
 line 381 is completely blank, with nothing on it at all.  I don't
 understand, therefore, how the message could refer to line 381, position 39.
  
   I'd appreciate any advice as to how to solve the error.
  
   Hubert
  
   ---
   Hubert Earl
  
   ICQ#: 16199853
  
   My Jamaican Art, Craft  More Online Store:
 http://www.angelfire.com/ny/hearl/link_page_for_go_jamaica.html
   Check out the art print bargains available! Beautiful prints as low as
 US$7.50 each, less if you purchase 2 or more. Also being sold:  the
 Genealogy of Jamaica CD-ROM
  
  
 

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: how to do a loop? ...or something.

2001-06-22 Thread kraybill

Aimee

You're right. Actually,  now that I think of it, the way I've handled 
this situation is to append the ID number to the name of the field, 
e.g.:

INPUT TYPE=text NAME=Name_#ID# VALUE=#Name#
and do the same for the address, then just loop through all the 
fieldnames that start with Name_, use the Eval function to get the 
name value in each case, parse out the ID number (using List 
functions with the underscore as the delimiter) and then use that 
same ID number with Address_#ID# to determine with the 
corresponding Address value.

The logic would go something like this:

CFLOOP through the fieldnames
If the field begins with Name_, determine its value and parse 
out the ID number.
Use the same ID number and plug it into Address_#ID# to 
determine the address value.
Update that record.
/CFLOOP

Others may have a better way...

Gene Kraybill   

On 21 Jun 2001, at 23:20, Aimee Abbott wrote:

 Gene, Thanks!
 
 Unfortunately not that simple.  It doesn't pass a null value.  If I have 
 three of them and only two addresses I get a list with only two elements in 
 it, not two and a null.  My *current* idea is to put the default
 input type=text value=--None-- etc...
 for any field that does not have a value.  Then use basically your script 
 to parse it out.  This will break though if someone enters something  and 
 then decides it was a mistake, deletes it, and types it on the next 
 line.  I thought maybe I could count the list elements to make sure they 
 were correct but then what?
 
 Does CFinput work the same way I wonder?
 
 At 11:39 PM 6/21/2001 -0700, you wrote:
 Aimee,
 
 Here's one possible way:
 
 The form fields for the addresses, all named address, will produce
 a comma-delimited list with as many elements as people. That is,
 even if some of the address fields are blank, the form will still pass
 those to the action template.
 
 I assume you're also using a unique ID number for each contact,
 so you could populate the initial form with hidden input fields, like
 this, to pass the ID numbers retrieved via your second query:
 
 INPUT TYPE=hidden NAME=ContactID
 VALUE=#ContactID#
 
 Then you should be able to loop through the ContactIDs using LIST
 functions, something like this to save the info:
 
 CFSET Counter=0
 CFLOOP INDEX=ThisContactID  LIST=#Form.ContactID#
  CFSET Counter=Counter+1
  CFQUERY NAME=SaveContact DATASOURCE=yourdb
  UPDATE Contacts
  SET Name=#ListGetAt(Form.Name, Counter)#,
  Address=#ListGetAt(Form.Address, Counter)#
  WHERE ContactID=#ThisContactID#
  /CFQUERY
 /CFLOOP
 
 ListGetAt combined with the Counter number will keep the
 information in sync...
 
 Gene Kraybill
 LPW  Associates
 Mansfield, PA
 
 On 21 Jun 2001, at 20:27, Aimee Abbott wrote:
 
  
   Hello everyone!
  
   I have a database of companys, names, contacts and addresses.  Not all
   companys have contact addresses.  I am setting up a form that will allow
   people to come and change their address.  They will get to the form by
   entering a url with a primary key at the end of it.  This will query up 
  the
   company and then a second query will get the people.  The second gets the
   contact names and addresses -- there can be as many as a dozen
   contacts.  That is the one I am having trouble with.  What I have done is
   set it up so (in simple form)
  
   form action...whatever
   cfoutput query=first
   !--- company info up here.  Only one company per web page. ---
   /cfoutput
  
   cfoutput query=second
   name: input type=text name=person value=#name#
   address: input type=text name=address value=#address#
   /cfoutput
  
   /form
   Now, like I said there can be a lot of contact names.
  
   So, then on the next page where I save it in the database, what do I 
  do?  I
   get the information in the form of a list. Where
   #name#=bob, mary, alice, harry, john
   but not everyone has an address so I might get
   #address#=chicago, minneapolis, rome
  
   I need to some how match these up somehow and update the record.  Any idea
   how I can go about doing this?
  
   I have thought about the first page having some sort of number appended on
   to the end of the variable name so the form would somehow have name1,
   name2, name3, name4 but I don't actually know how to do that.
  
   Or from the second page, can I access individual list elements?  And even
   if I could, how could I know that bob is from chicago, mary is blank and
   alice is from minneapolis?
  
   If I haven't explained this well enough please let me know!
  
   Thanks much!
  
  
  

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



CFQUERY and DEBUG

2001-06-21 Thread kraybill

How can I switch the DEBUG param of CFQUERY on or off, using 
a URL variable? (My hosting provider has this turned off in CF 
Administrator, and I'd like to be able to selectively display this info 
to resolve some live server issues. The query string Mode=Debug 
throws -- or is set to throw? -- a standard HTTP 500 error.)

You can't put the conditional clause INSIDE the opening 
CFQUERY tag, and even the following option throws an error:

CFIF IsDefined(URL.DebugThisQuery)
CFSET DebugVar=DEBUG
CFELSE
CFSET DebugVar=
/CFIF

CFQUERY NAME=test #DebugVar#
SELECT * FROM Table
WHERE ID=2
/CFQUERY

Is there a way to do this short of repeating the entire CFQUERY 
statement for both conditions? 

I'm also wondering if anyone knows of a custom tag that will 
basically emulate the standard var and query debugging output, 
again for selective use in shared hosting situations. Had a look at 
the Allaire Dev Exchange, but maybe someone can recommend 
one...

Gene Kraybill

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: how to do a loop? ...or something.

2001-06-21 Thread kraybill

Aimee,

Here's one possible way:

The form fields for the addresses, all named address, will produce 
a comma-delimited list with as many elements as people. That is, 
even if some of the address fields are blank, the form will still pass 
those to the action template.

I assume you're also using a unique ID number for each contact, 
so you could populate the initial form with hidden input fields, like 
this, to pass the ID numbers retrieved via your second query:

INPUT TYPE=hidden NAME=ContactID 
VALUE=#ContactID#

Then you should be able to loop through the ContactIDs using LIST 
functions, something like this to save the info:

CFSET Counter=0
CFLOOP INDEX=ThisContactID  LIST=#Form.ContactID#
CFSET Counter=Counter+1
CFQUERY NAME=SaveContact DATASOURCE=yourdb
UPDATE Contacts
SET Name=#ListGetAt(Form.Name, Counter)#,
Address=#ListGetAt(Form.Address, Counter)#
WHERE ContactID=#ThisContactID#
/CFQUERY
/CFLOOP

ListGetAt combined with the Counter number will keep the 
information in sync...

Gene Kraybill
LPW  Associates
Mansfield, PA

On 21 Jun 2001, at 20:27, Aimee Abbott wrote:

 
 Hello everyone!
 
 I have a database of companys, names, contacts and addresses.  Not all 
 companys have contact addresses.  I am setting up a form that will allow 
 people to come and change their address.  They will get to the form by 
 entering a url with a primary key at the end of it.  This will query up the 
 company and then a second query will get the people.  The second gets the 
 contact names and addresses -- there can be as many as a dozen 
 contacts.  That is the one I am having trouble with.  What I have done is 
 set it up so (in simple form)
 
 form action...whatever
 cfoutput query=first
 !--- company info up here.  Only one company per web page. ---
 /cfoutput
 
 cfoutput query=second
 name: input type=text name=person value=#name#
 address: input type=text name=address value=#address#
 /cfoutput
 
 /form
 Now, like I said there can be a lot of contact names.
 
 So, then on the next page where I save it in the database, what do I do?  I 
 get the information in the form of a list. Where
 #name#=bob, mary, alice, harry, john
 but not everyone has an address so I might get
 #address#=chicago, minneapolis, rome
 
 I need to some how match these up somehow and update the record.  Any idea 
 how I can go about doing this?
 
 I have thought about the first page having some sort of number appended on 
 to the end of the variable name so the form would somehow have name1, 
 name2, name3, name4 but I don't actually know how to do that.
 
 Or from the second page, can I access individual list elements?  And even 
 if I could, how could I know that bob is from chicago, mary is blank and 
 alice is from minneapolis?
 
 If I haven't explained this well enough please let me know!
 
 Thanks much!
 
 

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



SQL Server query

2001-06-20 Thread kraybill

I'm having difficulty getting a test template to work after setting up MSDE 
and Enterprise Manager on a dev laptop. I'm a newcomer to SQL Server, so 
it may be something obvious...

I get this error:

-
CMemoryException: unknown cause
PCodeRuntimeContextImp::executeSQLTagCFQuery::endTag
The error occurred while processing an element with a general identifier of 
(CFQUERY)...
-
The error comes from this very simple template:

CFQUERY NAME=test DATASOURCE=my_SQLServerDb 
USERNAME=my_username PASSWORD=my_password
SELECT * 
FROM my_SQLServerDb.dbo.WebPages;
/CFQUERY


Don't know if it could be a permissions error. I'm still coming up to speed 
with how they work in SQL Server. I do have the ODBC datasource for this 
db set up with the username and password shown in the query, and I've set 
Object Permissions for the WebPages table to include the use of SELECT 
for this username ...

Gene Kraybill

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: SQL Server query (Followup)

2001-06-20 Thread kraybill

I've narrowed this issue down a bit...

Seems the query works fine if it reads:

SELECT field1, field2, etc
FROM Table

but it throws an error with
SELECT *
FROM Table

Running MSDE (SQL Server 7) and CF 4.0.1. Why would the 
asterisk throw an error?

Gene Kraybill

On 20 Jun 2001, at 10:34, [EMAIL PROTECTED] wrote:

 I'm having difficulty getting a test template to work after setting up MSDE 
 and Enterprise Manager on a dev laptop. I'm a newcomer to SQL Server, so 
 it may be something obvious...
 
 I get this error:
 
 -
 CMemoryException: unknown cause
 PCodeRuntimeContextImp::executeSQLTagCFQuery::endTag
 The error occurred while processing an element with a general identifier of 
 (CFQUERY)...
 -
 The error comes from this very simple template:
 
 CFQUERY NAME=test DATASOURCE=my_SQLServerDb 
 USERNAME=my_username PASSWORD=my_password
   SELECT * 
   FROM my_SQLServerDb.dbo.WebPages;
 /CFQUERY
 
 
 Don't know if it could be a permissions error. I'm still coming up to speed 
 with how they work in SQL Server. I do have the ODBC datasource for this 
 db set up with the username and password shown in the query, and I've set 
 Object Permissions for the WebPages table to include the use of SELECT 
 for this username ...
 
 Gene Kraybill
 

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: SQL Server query

2001-06-20 Thread kraybill

I've discovered the CFQUERY actually works fine if the SQL is like 
this:

SELECT field1, field2 
FROM Table

(with or without the semi-colon)

but it fails on:

SELECT *
FROM Table

Could this be an MDAC version issue? When I installed Ent Mgr, it 
apparently installed MDAC 6, according to the results of 
Component Checker. If it's MDAC-related, how tricky is it to go 
back to MDAC 2.1 SP2?

Gene Kraybill

On 20 Jun 2001, at 9:05, Mark Warrick wrote:

 You've got a semi-colon at the end of your SQL statement.  Although this
 would work fine in the SQL Query tool, within a CFQUERY it will not.
 
 Also, you don't need to specify the entire object path to the table, just
 the tablename itself.  This has nothing to do with the error you got;  it's
 just an FYI.
 
 ---mark
 
 
 Mark Warrick - Fusioneers.com
 Personal Email: [EMAIL PROTECTED]
 Business Email: [EMAIL PROTECTED]
 Phone: 714-547-5386
 Efax: 801-730-7289
 Personal URL: http://www.warrick.net
 Business URL: http://www.fusioneers.com
 ICQ: 125160 / AIM: markwarric
 
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, June 20, 2001 10:34 AM
  To: CF-Talk
  Subject: SQL Server query
 
 
  I'm having difficulty getting a test template to work after
  setting up MSDE
  and Enterprise Manager on a dev laptop. I'm a newcomer to SQL Server, so
  it may be something obvious...
 
  I get this error:
 
  -
  CMemoryException: unknown cause
  PCodeRuntimeContextImp::executeSQLTagCFQuery::endTag
  The error occurred while processing an element with a general
  identifier of
  (CFQUERY)...
  -
  The error comes from this very simple template:
 
  CFQUERY NAME=test DATASOURCE=my_SQLServerDb
  USERNAME=my_username PASSWORD=my_password
  SELECT *
  FROM my_SQLServerDb.dbo.WebPages;
  /CFQUERY
 
 
  Don't know if it could be a permissions error. I'm still coming
  up to speed
  with how they work in SQL Server. I do have the ODBC datasource for this
  db set up with the username and password shown in the query, and I've set
  Object Permissions for the WebPages table to include the use of SELECT
  for this username ...
 
  Gene Kraybill
 
 

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: SQL Server query (MDAC Version correction)

2001-06-20 Thread kraybill

Sorry, I meant to say Component Checker indicates I'm currently 
running MDAC Version 2.6...

Gene

On 20 Jun 2001, at 13:59, [EMAIL PROTECTED] wrote:

 I've discovered the CFQUERY actually works fine if the SQL is like 
 this:
 
 SELECT field1, field2 
 FROM Table
 
 (with or without the semi-colon)
 
 but it fails on:
 
 SELECT *
 FROM Table
 
 Could this be an MDAC version issue? When I installed Ent Mgr, it 
 apparently installed MDAC 6, according to the results of 
 Component Checker. If it's MDAC-related, how tricky is it to go 
 back to MDAC 2.1 SP2?
 
 Gene Kraybill
 
 On 20 Jun 2001, at 9:05, Mark Warrick wrote:
 
  You've got a semi-colon at the end of your SQL statement.  Although this
  would work fine in the SQL Query tool, within a CFQUERY it will not.
  
  Also, you don't need to specify the entire object path to the table, just
  the tablename itself.  This has nothing to do with the error you got;  it's
  just an FYI.
  
  ---mark
  
  
  Mark Warrick - Fusioneers.com
  Personal Email: [EMAIL PROTECTED]
  Business Email: [EMAIL PROTECTED]
  Phone: 714-547-5386
  Efax: 801-730-7289
  Personal URL: http://www.warrick.net
  Business URL: http://www.fusioneers.com
  ICQ: 125160 / AIM: markwarric
  
  
   -Original Message-
   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, June 20, 2001 10:34 AM
   To: CF-Talk
   Subject: SQL Server query
  
  
   I'm having difficulty getting a test template to work after
   setting up MSDE
   and Enterprise Manager on a dev laptop. I'm a newcomer to SQL Server, so
   it may be something obvious...
  
   I get this error:
  
   -
   CMemoryException: unknown cause
   PCodeRuntimeContextImp::executeSQLTagCFQuery::endTag
   The error occurred while processing an element with a general
   identifier of
   (CFQUERY)...
   -
   The error comes from this very simple template:
  
   CFQUERY NAME=test DATASOURCE=my_SQLServerDb
   USERNAME=my_username PASSWORD=my_password
 SELECT *
 FROM my_SQLServerDb.dbo.WebPages;
   /CFQUERY
  
  
   Don't know if it could be a permissions error. I'm still coming
   up to speed
   with how they work in SQL Server. I do have the ODBC datasource for this
   db set up with the username and password shown in the query, and I've set
   Object Permissions for the WebPages table to include the use of SELECT
   for this username ...
  
   Gene Kraybill
  
  
 

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



SQL Server: front-end choice

2001-06-18 Thread kraybill

Another question from an upsized developer g, re. SQL Server:

What are the pros and cons of using Access 2000 as a front-end 
vs using Enterprise Manager? I'm told Access 2000 will handle 
much of what you typically have to do with a db -- what kinds of 
things will it NOT handle? If you're serious, should you just focus 
on using Ent Mgr exclusively? 

Also, when designing/developing/refining a db for use with CF, 
when is it best to use front-end GUI tools like Access and Ent Mgr, 
and when is it best to use direct scripting via CFQUERY/SQL 
statements?

Gene Kraybill


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Enterprise Manager connection to SQL Server

2001-06-17 Thread kraybill

Newcomer to SQL Server... I'm attempting to use Enterprise 
Manager to connect via an ISP to a SQL Server 2000 db on a 
shared host. I was successful in doing that on Friday, but after 
installing MSDE on my Win98 dev laptop, the connection always 
failed (Server does not exist or access denied).

I've uninstalled MSDE and reinstalled Enterprise Mgr, still to no 
avail. I CAN successfully ping the db, and I've confirmed that the 
Client Network Utility is set up to use TCP/IP as the protocol. My 
hosting service says I should confirm that I can use Port 1433, but 
I'm unsure how to do that or how to further diagnose what's 
happening. Any help appreciated!

Gene Kraybill

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



OT: Hostcentric

2001-06-11 Thread kraybill

Does anyone know how to get response from Hostcentric?

For more than two weeks, we have been trying unsuccessfully to 
get them to close one of our client's accounts. Several emails have 
produced nothing more than an automated response, their 800 
number doesn't work from northern Pennsylvania, and there has 
been no reply after leaving a message on an Orlando phone 
number that we were given by the people at Virtualscape (a related 
company). Meanwhile, we received an automatic billing for the 
continuation of the account...

Frustrated, 

Gene Kraybill
LPW  Associates LLC
570-549-

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Repost: Unknown Parser Error

2001-06-08 Thread kraybill

No answers from my first post regarding:
-- Error --
Just in time compilation error
unknown parser error
The last successfully parsed CFML construct was the CFML template 
beginning occupying document position (1:1) to (1:1)
-- End of Error --

Some mysteries:

1. This error appears sporadically on SOME, but not all templates. When it 
appears on one, then it tends to appear on numerous templates until the 
CF server is restarted.

2. When this occurs, I can repeat the SAME error when I put one or two 
simple words in a .cfm file and attempt to run it. E.g., a file with just the 
words Just testing... throws the same error, though there's obviously no 
legitimate reason for the server to have a parser problem with a simple two-
word text file...

I found some posts here and on Allaire re. this message, but very few 
suggestions as to a cause. Can anyone shed any light at all? This is 
occurring on a shared host running CF 4.5.1 and IIS.

Gene Kraybill

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Challenging dillemma (double values?)

2001-06-06 Thread kraybill

Could you do something like this:

option value=#PartName#_#price##PartName#/option

and then use list functions to parse out the two components, using 
the underscore delimiter...

Gene Kraybill
LPW  Associates

On 6 Jun 2001, at 10:16, Michel Gagnon wrote:

 I have a little challenging question for you.
 I have a build your own computer system 
 page where customers can choose what parts 
 they want in their system.  There is a javascript
 that calculates everything on the fly.
 This javascript needs to have the price
 as the value:
 
 option value=#price##PartName#/option
 
 But, I also need to pass the partID to the server, not the price.
 Is there a way that we could have the best of both world?
 The calculating javascript and the PartID's to send to the server?
 
 

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Unknown Parser Error

2001-06-01 Thread kraybill

On a shared hosting service, we're getting a lot of (intermittent) errors 
like this:
Just in time compilation error 
unknown parser error
The error then points to the very first character of the first line of the 
template, so that seems spurious.
CF-Talk archives show numerous similar reports, but very little in the 
way of possible causes. The same code runs fine on our development 
server.
Any suggestions appreciated!
Gene Kraybill



~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Hosting

2001-05-23 Thread kraybill

We're considering Atswebnet and Cosmotek (Webexpose) for 
possible use as web hosting services. I know atswebnet has been 
discussed previously but haven't seen much about Cosmotek. Any 
pros or cons from anyone familiar with the overall performance of 
this service?

Gene Kraybill

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Verity: Hair-Pulling Problem

2001-05-17 Thread kraybill

I'm losing hair (and time!) over a very frustrating problem using 
Verity with CF.

I have an application that uses two Verity collections. I can 
successfully create the first collection and retrieve info from it, and 
can then do the same with the second collection. However, when I 
go back and do an update on the first collection, these 2 error 
messages are generated in file/sysinfo.log:
--
Thu May 17 23:43:05 2001
msg(1): Error   E3-0422 (VDK 2): Could not find file Page_338.htm

Thu May 17 23:43:05 2001
msg(1): Error   E3-0032 (VDK): No valid documents found in 
C:\WINNT\CFI70CB.tmp for collection 
E:\Web\worldwideguide\guides\verity\Guide_2_Pages\file
--
The contents of this update also do not show up in searches.

The problem is at least consistent, now that I've figured out what's 
actually happening. I feel confident of my code, as I have brought 
all the steps together into a single template for testing purposes, 
and simply pass a few URL variables to change collections, specify 
documents, etc. Adding documents initially works fine in both 
collections, but whenever I return to the collection I created first, 
updates there invariably fail and produce the messages shown 
above, EVEN if the update involves the exact same content that 
was successfully added or updated during the first round. 

I could conceivably work around this by building both collections 
one at a time, then deleting and rebuilding the first collection 
whenever additional updates are needed there. But the non-
updatable problem would then shift to the second collection, and I'd 
have to do a complete rebuild for any updates there. What a 
hassle...

I should mention that this code is for a spider-type search engine 
I've built, which retrieves external Web pages via CFHTTP, indexes 
them and then places a META redirect in a text file which is keyed 
to that record in Verity. Seems to work great except for this 
bugaboo...

Any ideas greatly appreciated...

Gene Kraybill
LPW  Associates LLC
Mansfield, PA

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Verity: Hair-Pulling Problem

2001-05-17 Thread kraybill

Thanks for the suggestion, but I've actually been DELETING the 
entire collection (CFCOLLECTION action=delete) while trying to 
fix this... I assume that does the same as a purge, and more...

Gene K.

Peter Tilbrook wrote:

 Try purging both collections before you update them.
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of
 [EMAIL PROTECTED]
 Sent: Friday, 18 May, 2001 5:25 PM
 To: CF-Talk
 Subject: Verity: Hair-Pulling Problem
 
 
 I'm losing hair (and time!) over a very frustrating problem using
 Verity with CF.
 
 I have an application that uses two Verity collections. I can
 successfully create the first collection and retrieve info from it, and
 can then do the same with the second collection. However, when I
 go back and do an update on the first collection, these 2 error
 messages are generated in file/sysinfo.log:
 --
 Thu May 17 23:43:05 2001
 msg(1): Error   E3-0422 (VDK 2): Could not find file Page_338.htm
 
 Thu May 17 23:43:05 2001
 msg(1): Error   E3-0032 (VDK): No valid documents found in
 C:\WINNT\CFI70CB.tmp for collection
 E:\Web\worldwideguide\guides\verity\Guide_2_Pages\file
 --
 The contents of this update also do not show up in searches.
 
 The problem is at least consistent, now that I've figured out what's
 actually happening. I feel confident of my code, as I have brought
 all the steps together into a single template for testing purposes,
 and simply pass a few URL variables to change collections, specify
 documents, etc. Adding documents initially works fine in both
 collections, but whenever I return to the collection I created first,
 updates there invariably fail and produce the messages shown
 above, EVEN if the update involves the exact same content that
 was successfully added or updated during the first round.
 
 I could conceivably work around this by building both collections
 one at a time, then deleting and rebuilding the first collection
 whenever additional updates are needed there. But the non-
 updatable problem would then shift to the second collection, and I'd
 have to do a complete rebuild for any updates there. What a
 hassle...
 
 I should mention that this code is for a spider-type search engine
 I've built, which retrieves external Web pages via CFHTTP, indexes
 them and then places a META redirect in a text file which is keyed
 to that record in Verity. Seems to work great except for this
 bugaboo...
 
 Any ideas greatly appreciated...
 
 Gene Kraybill
 LPW  Associates LLC
 Mansfield, PA

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



OT: Spider 404s

2001-05-09 Thread Gene Kraybill

I'm building a little spider in CF and want to check each page as it's retrieved to 
determine whether it contains the expected contents.

Seems like looking for  404  in CFHTTP.FileContent won't cover everything. Does 
anyone have a good working list of words/phrases that can be used to verify links and 
ensure they're still active?

Gene Kraybill

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Last row inserted

2001-04-18 Thread Gene Kraybill

It's my understanding that CFTRANSACTION may not give guaranteed protection here, 
if your database supports row-level locking. Correct?

Howie Hamlin wrote:

 Yep that's it.  However, you should do a transaction so that another record
 isn't added while you're fetching the current highest ID.
 
 - Original Message -
 From: "Joshua Tipton" [EMAIL PROTECTED]
 To: "CF-Talk" [EMAIL PROTECTED]
 Sent: Tuesday, April 17, 2001 1:34 AM
 Subject: Last row inserted
 
  I know this has been asked a million times but what is the best way to
 pull
  the id of the row last inserted.  Isnt select (column name)MAX as
  (whatever)?

-----
Gene Kraybill
LPW  Associates LLC
www.lpw.net

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



OT: Scheduled File Transfers

2001-04-11 Thread Gene Kraybill

We need to automate a daily file transfer process between another company's 
computer with dialup Internet access but no Cold Fusion or Web server software, and 
our Web/CF server (from the company's computer TO our server.)

Is this typically done by setting up a command line version of a standard FTP client, 
and then firing that daily by using the NT scheduler, or are there better ways? 

Gene Kraybill
-
Gene Kraybill
LPW  Associates LLC
www.lpw.net

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



OT: JS syntax error

2001-02-05 Thread Gene Kraybill

This code works in IE, but not in Netscape (4.61)... Can someone help?

function windowOpen() {
leftPos=0;
if (screen) {
leftPos=screen.width-420;
topPos=screen.height-470;
}
var myWindow=
window.open('index.cfm?fuseapp=Productsfuseaction=Catalog','PopUp',
'height=screen.height,width=400,left='+leftPos+',top=30,scrollbars=yes,resizable=no,
toolbar=no,menubar=no');
if (!myWindow.opener) myWindow.opener = self;
}

Gene Kraybill
LPW  Associates
-
Gene Kraybill
LPW  Associates LLC
www.lpw.net

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



CFLOCK for 4.0.1 AND 4.5.1

2001-01-22 Thread Gene Kraybill

I'm struggling with implementing CFLOCK so it runs on BOTH CF 4.0.1 and 4.5.1. (The 
4.5.1 server has FULL CHECKING on.) 

Given that 4.0.1 FORBIDS the SCOPE parameter in CFLOCK and 4.5.1 REQUIRES it, 
I thought I'd do a check for which version of CF was running and stash the appropriate 
CFLOCK parameters into a local variable. For example, if CF 4.5.1 or better, I'd set 
the 
parameter var to be equal to 'SCOPE="Application" TYPE="Exclusive"', etc.

So my CFLOCK would look like this:

CFLOCK #VersionSpecificParameter#
code...
/CFLOCK

But... CF throws an error on the pound sign, apparently not allowing the specification 
of parameters via variable.

Any ideas besides repeating the entire CFLOCK block for each version?

Gene Kraybill
-----
Gene Kraybill
LPW  Associates LLC
www.lpw.net

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Searching Help files in Studio

2001-01-04 Thread Gene Kraybill

Thanks for that idea, but no, it's 4.0.1...

I can browse the Help files using the reference "tree", but whenever I do a search, it 
returns no results, even for the simplest of keywords. Guess it's been that way since 
installation -- I've been relying on the index in the manual. Any other ideas?

Gene Kraybill

Neil Clark wrote:

 is this Studio 4.5.2?  if so they have recalled it (well they are in the
 middle of an update and is temp unavailable) due to a problem with the Help
 Files.

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Searching Help files in Studio

2001-01-04 Thread Gene Kraybill

And it also fixed the Studio Help Search for me. Many thanks!

Gene Kraybill

Jann VanOver [EMAIL PROTECTED] wrote:

 Thanks Aaron!  I wasn't the person who posted the problem originally, but
 I've been having the same problem with Studio 4.5.1  
 
 The article you referred to fixed it for me!
 
Aaron Johnson [EMAIL PROTECTED] wrote:
 
 Check out this KB:
 
 Search in Studio 4.0 or HomeSite 4.0 doesn't work
 http://www.allaire.com/Handlers/index.cfm?ID=13516Method=Full



-
Gene Kraybill
LPW  Associates LLC
www.lpw.net

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Searching Help files in Studio

2001-01-03 Thread Gene Kraybill

In Studio, I can browse the Help reference tree, finding topics by drilling down, but 
when I use the Search facility, I always get "No matches found", even when searching 
all references for the most common words. Must be a very simple solution that I'm 
overlooking...

Gene Kraybill
-
Gene Kraybill
LPW  Associates LLC
www.lpw.net

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



NULL problem in Query

2000-12-20 Thread Gene Kraybill

Mystery. Can someone tell me what I'm missing?

I have an Access date field called WhenSubmitted. I start with the field populated. 
Then I run this test:

CFQUERY NAME="SetNull" DATASOURCE="vasco1new"
UPDATE Orders
SET WhenSubmitted=NULL
WHERE OrderID=4
/CFQUERY

I manually check the field. It is now empty, presumably set to NULL. But when I run 
the following, I get a record count of 0.

CFQUERY NAME="GetNull" DATASOURCE="vasco1new"
SELECT *
FROM Orders
WHERE WhenSubmitted=NULL;
/CFQUERY

CFOUTPUT#GetNull.RecordCount#/CFOUTPUT

Gene Kraybill
-----
Gene Kraybill
LPW  Associates LLC
www.lpw.net

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Preventing Browsers Cacheing a .cfm file

2000-12-11 Thread Gene Kraybill

I have a page where Javascript (the onchange event in a SELECT box) reloads a page 
and resets some session vars. I had problems where those session vars would not get 
reset because the page was being pulled out of the browser cache.

The problem disappeared if I set the browser options to check the page every time, but 
I couldn't rely on all users having that option set in their own browsers. Taking a 
cue 
from an old post to this list, I found that adding a random number to the query string 
for 
the reload action fixed the problem -- but using the standard META Pragma/ META 
Expire tags did not. Can someone please explain why the META no-cache tags don't 
work in a situation like this?

Gene Kraybill


-
Gene Kraybill
LPW  Associates LLC
www.lpw.net

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



OT: SQL Union

2000-12-09 Thread Gene Kraybill

I want to use the UNION operator to combine two SELECT statements. My problem is 
that one of the SELECTs draws data that has one less column than the other, 
because the table used in the second is missing one of the columns found in the first. 
I'm trying to work out a way to create a dummy boolean column in the second query 
and populate it with the value of 0, so the UNION operator works.

Something like

SELECT Column1, Column 2, Column3
FROM Table1
UNION 
SELECT Column1, Column2, 0 as Column3
FROM Table2

This doesn't work. What will?

Gene Kraybill

-
Gene Kraybill
LPW  Associates LLC
www.lpw.net

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



OT: Javascript problem

2000-12-05 Thread Gene Kraybill

Looking for a bit of help with some Javascript I want to use in a CF app. 

I want to be able to open a popup window (TEST_POPUP.CFM), enter a value in that 
window, and then submit the popup window so it changes a field in the original page 
(TEST_MAIN.CFM) to the popup value and automatically submits the original page to 
its action script (TEST_ACTION.CFM). I need to show the action page's results in the 
original window and close the popup window. 

With these 3 little test scripts, the value from the popup window appears in the input 
field of the original page, but the original page doesn't get submitted to the action 
page. What am I missing?

Gene Kraybill
==

TEST_MAIN.CFM:

script language="JavaScript"!--
function windowOpen() {
var myWindow=window.open('test_popup.cfm','windowRef','width=200,height=200');
if (!myWindow.opener) myWindow.opener = self;
}

windowOpen();
//--/script
 
form METHOD="Post" action="test_action.cfm"
input type="text" value="" name="output"
/form

TEST_POPUP.CFM

script language="JavaScript"!--
function updateOpener() {
opener.document.forms[0].output.value = document.forms[0].input.value;
opener.document.forms[0].submit;
window.close();
}
//--/script

form onSubmit="updateOpener()"
input type="text" value="" name="input"
input type="submit"
/form

TEST_ACTION.CFM

html
body
this is the page that processes the results from the main page.
CFOUTPUToutput is: #form.output#/CFOUTPUT
/body
/html

-
Gene Kraybill
LPW  Associates LLC
www.lpw.net

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Pulling hair with CFLOCK

2000-11-16 Thread Gene Kraybill

I keep getting this message with a certain CFLOCK:

"Timed out while waiting to obtain exclusive access. The error occurred while 
processing an element with a general identifier of (CFLOCK)..."

I have been able to isolate the problem by constructing the following test template. 
The 
first CFLOCK always works fine, but the second one always times out.

CFLOCK NAME="#Session.SessionID#" timeout="30"
CFSET Session.Total = "123"
/CFLOCK
cfinclude template="../functions/custinfo.cfm"
CFLOCK NAME="#Session.SessionID#" timeout="30"
CFSET Session.Total = "123"
/CFLOCK

The CFINCLUDEd template that seems to cause the problem makes read access to a 
number of session variables. This is on a test site where nobody else is accessing 
this 
template. (I'm using the NAME parameter because this code needs to work with both 
4.0.1 and 4.5.1.)

Can someone please help?

Gene Kraybill
-
Gene Kraybill
LPW  Associates LLC
www.lpw.net
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
https://secure.houseoffusion.com

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: CFLOCK - need help

2000-11-07 Thread Gene Kraybill

Many thanks to Dave and Steve! With that combined genius and further 
experimentation, I think I have a cross-version solution: I'll use 
NAME="#Session.SessionID#" with session variable locks, and 
NAME="#Application.ApplicationName#" with application variable locks.

I discovered, strangely, that ANY OTHER name in either case fails on 4.5.1, at least 
with FULL CHECKING on. For example, CF 4.5.1 doesn't let me use 
NAME="Test_#Application.ApplicationName#". Is that a bug or a feature? (My host, a 
well-known company, says they must keep FULL CHECKING on to protect the 
environment on a shared server.)

Gene

Dave Watts wrote:
 If you need backwards compatibility, don't use the new SCOPE attribute;
 use the NAME attribute instead. That's all you have to do. If you're
 working with only 4.5.1 servers, you'd be better off using the SCOPE
 attribute, but since you're not, you'll have to stick with NAME.

Steve Nelson wrote:

 If you wrote your locks in 4.01
 syntax it would work in both.
 
 cflock name="#application.applicationname#" type="exclusive"
 timeout=20
 
Gene Kraybill wrote:
   
  Does anyone know a way to use CFLOCK so it works in both CF 4.0.1 and
  4.5.1?
  
  I have an application written using the older CFLOCK parameter
  of "NAME", rather than the new ones of "SCOPE" and "TYPE". I know Allaire
  has a wizard to convert CFLOCKs to the new parameters, but my problem is I
  need to be able to run the same code on BOTH 4.0.1 and 4.5.1. The 4.5.1
  server has "full checking on" for security reasons (beyond my control), so
  if I include both the old and new parameters with each CFLOCK, it throws
  an error.
-
Gene Kraybill
LPW  Associates LLC
www.lpw.net

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



CFLOCK - need help

2000-11-04 Thread Gene Kraybill

Trying again for help on this, rephrasing:

Does anyone know a way to use CFLOCK so it works in both CF 4.0.1 and
4.5.1?

I have an application written using the older CFLOCK parameter
of "NAME", rather than the new ones of "SCOPE" and "TYPE". I know Allaire 
has a wizard to convert CFLOCKs to the new parameters, but my problem is I
need to be able to run the same code on BOTH 4.0.1 and 4.5.1. The 4.5.1
server has "full checking on" for security reasons (beyond my control), so
if I include both the old and new parameters with each CFLOCK, it throws
an error.

Someone tell me there's a way around this!

Gene Kraybill

-----
Gene Kraybill
LPW  Associates LLC
www.lpw.net

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



Debugging info

2000-11-01 Thread Gene Kraybill

I've been mystified recently by what seems to be the failure of the CFServer to 
display 
standard debugging info in certain cases. (Makes debugging a nightmare!)

I DO have ALL the debugging checkboxes turned on (and  no IP restrictions) in the 
"Debugging" section of the administrator. I can catch the errors using 
CFTRY/CFCATCH, but they should display without that... 

Example: A change to the Required attribute in a field in an Access db caused an 
insert to fail -- and the rest of the template to bomb out. But NO debugging  info 
appeared until I created a CFTRY/CFCATCH... I noticed the same kind of problem with 
a call to a variable which didn't exist.

Ideas?

Gene Kraybill


-
Gene Kraybill
LPW  Associates LLC
www.lpw.net

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



OT: combining SQL queries

2000-09-29 Thread Gene Kraybill

CFQUERY NAME="GetSenderDetails" DATASOURCE="#datasource#"
SELECT UserName, FirstName, LastName, Email
FROM Users
WHERE UserNumber=#Session.UserNumber# 
/CFQUERY
CFQUERY NAME="GetOrdererDetails" DATASOURCE="#datasource#"
SELECT UserName, FirstName, LastName, Email
FROM Users
WHERE UserNumber=#GetOrder.UserNumber# 
/CFQUERY
CFQUERY NAME="GetApproverDetails" DATASOURCE="#datasource#"
SELECT UserName, FirstName, LastName, Email
FROM Users
WHERE UserNumber=#GetOrder.ApprovalBy# 
/CFQUERY

Any way to combine these three queries and still be able to reference the Sender, 
Orderer and Approver in my output?

Gene Kraybill
-
Gene Kraybill
LPW  Associates LLC
www.lpw.net
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Debugging an undefined DB

2000-09-15 Thread Gene Kraybill

Why doesn't an attempt to access an undefined DB produce a CF error?

Just spent too much time trying to figure out why pages on a db-driven site weren't 
displayingNo errors, no content, just the standard CGI variables, etc. at the 
bottom...

It seemed to be a CFSETTING ENABLECFOUTPUTONLY problem, but eventually I 
remembered I hadn't defined the DSN after re-installing CF in the wake of a hard drive 
rebuild...Worked perfect once I redefined the DSN g...

The odd thing was that even tho I have all CF debugging turned ON, my pages came 
up without any CF errors...

Gene Kraybill
-
Gene Kraybill
LPW  Associates LLC
www.lpw.net
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Illegal operation in CFHTTP

2000-09-01 Thread Gene Kraybill

What might cause the following occasional error, apparently related to the use of 
CFHTTP to create a query from a text file?
--
Message: Illegal operation in Cold Fusion Extension (CFX)
Detail: You have attempted to refer to an invalid row/column combination of a query. 
This query contains 1 rows. You can call CCFXQuery::GetRowCount to determine 
the number of rows contained within a query.
You can call CCFXQuery::GetColumns to determine the number of columns 
contained within a query.
The error occurred while processing an element with a general identifier of 
(CFHTTP), occupying document position (29:4) to (34:22).

-

Here's the CFHTTP at that spot in the template:

CFHTTP METHOD="Get"
NAME="GetVisitorAddresses"

URL="#URLPath##LogDirectory##LogFilePrefix##LogFileSuffix#"
COLUMNS="Date, Time, IP, Referer, Browser, Version, OS"
DELIMITER=","
TEXTQUALIFIER=" "

(The file is create dynamically for logging page visits in a Fusebox setting.)

Any ideas?

Gene Kraybill
-
Gene Kraybill
LPW  Associates LLC
www.lpw.net
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Getting a value from a field

2000-08-31 Thread Gene Kraybill

On the form, you could name your products like this:

Prod_001
Prod_002
 etc.

Then on the action page, use form.fieldnames and CFLOOP to loop through all the 
fields. If the field begins with Prod_, you would then do:

Evaluate(thisfield) 

to determine whether the value is 0, and if not, you'd display that item...

Gene Kraybill
LPW  Associates

"Ben Densmore" [EMAIL PROTECTED]
 
 can someone tell me if there is a way to get values out of a form, =
 similar to using form.fieldname? Ihave a page where I have about 50 =
 products each with their own text box to enter a quantity. Once a person =
 submits the form I want to loop through it and if the particular item =
 doesn't have a 0 for a value then i want to display that item that was =
 ordered. any help would be appreciated.

-
Gene Kraybill
LPW  Associates LLC
www.lpw.net
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



CFOUTPUT grouping

2000-08-29 Thread Gene Kraybill

How do you implement a "CFOUTPUT Group" scenario when you need to give the user 
the option of displaying the results by different sorting orders?

I'm displaying a list of buildings, some of which have multiple managers. I allow the 
user to click on any column to indicate how they'd like the results sorted. The 
desired 
order is stored in Attributes.Order.

My SQL looks like this:

CFQUERY NAME="ListBuildings" DATASOURCE="#datasource#"
SELECT a.*, b.ManagerID, c.FirstName, c.LastName 
FROM Buildings a, BuildingManagers b, Users c
WHERE a.CustomerID=#Session.CustomerID#
AND b.BuildingID=a.ID
AND c.UserNumber=b.ManagerID
ORDER BY #Attributes.Order#
/CFQUERY  

To avoid displaying the duplicate building records in the case of multiple managers, I 
use this:

CFOUTPUT QUERY="ListBuildings" GROUP="ID"!--- ID is the building ID ---
#ListBuildings.BuildingName#
CFOUTPUT#ListBuildings.FirstName# #ListBuildings.LastName#/CFOUTPUT
!--- Nested CFOUTPUT displays one or more building managers---   
/CFOUTPUT

This works fine only when the sort order is by ID (building). What must I add to make 
it 
work for other sort orders?

Gene Kraybill
-
Gene Kraybill
LPW  Associates LLC
www.lpw.net
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Upgrade Issues 4.0.1 to 4.5.1

2000-08-28 Thread Gene Kraybill

Does anyone have a rather complete list of potential code problems that may arise 
from an upgrade from CF 4.0.1 to 4.5.1?

We're using 4.0.1, but have several sites on a web hosting service which is about to 
upgrade.

Thanks

Gene Kraybill
LPW  Associates
-
Gene Kraybill
LPW  Associates LLC
www.lpw.net
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



OT: Access 97 and 2000

2000-08-22 Thread Gene Kraybill

What does it take to run both Access 97 and Access 2000 on the same machine?

We have some small CF db's in Access 97. We have a development machine with 
Office 2000 and tried to install only the Access portion of Office 97 on the same 
machine.

When we try to start either version of Access, we now get this message:

"Microsoft Access can't start because there is no license for it on this machine."

Gene Kraybill


-
Gene Kraybill
LPW  Associates LLC
www.lpw.net
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Access 97 and 2000

2000-08-22 Thread Gene Kraybill

I see Access 2000 has an option to save in Access 97 format. Can anyone vouch for 
this as a reliable way of maintaining Access-97 dbs on a development machine when 
upgrading to 2000 isn't an option on the live server?

Gene Kraybill


Andy Ewings [EMAIL PROTECTED]

 I think you need to have them installed on a seperate drive, or
 partition - but I'm not 100% sure
 
 -Original Message-
 From: Gene Kraybill [mailto:[EMAIL PROTECTED]]
 Sent: 22 August 2000 18:55
 To: [EMAIL PROTECTED]
 Subject: OT: Access 97 and 2000
 
 
 What does it take to run both Access 97 and Access 2000 on the same machine?
 
 We have some small CF db's in Access 97. We have a development machine with 
 Office 2000 and tried to install only the Access portion of Office 97 on the
 same 
 machine.
 
 When we try to start either version of Access, we now get this message:
 
 "Microsoft Access can't start because there is no license for it on this
 machine."
 
 Gene Kraybill
 
 
 -----
 Gene Kraybill
 LPW  Associates LLC
 www.lpw.net
 
 --
 Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
 To Unsubscribe visit
 http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or
 send a message to [EMAIL PROTECTED] with 'unsubscribe' in
 the body.
 --
 Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
 To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or s
end a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
 


-
Gene Kraybill
LPW  Associates LLC
www.lpw.net
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Newbie Question - Creating Data Source for CSV text file

2000-08-11 Thread Gene Kraybill

Hi John,

You could write a few lines of CF to convert the CSV file into a query (using 
CFHTTP), then cfoutput the query and insert each record into a db table. If there's a 
way to use a CSV file as a datasource, I'm not aware of it. Even if there is a way, 
you'd 
be better off transferring the data to a proper db, with the speed advantages of 
indexes 
and other db features. 

Gene Kraybill
LPW  Associates

John McGown wrote:

 I have a customer that is a car dealership.  They want to put their car
 inventory online.
 The company that makes their inventory database tells me that the data store
 is not ODBC compliant, but that they could output a CSV text file that they
 will auto-FTP to our servers in the middle of the night.  Not exactly the
 most elegant solution, but it beats entering car data manually.  :)
 
 Can I create an ODBC connection in the CF Administrator to use a CSV text
 file as a data source? 
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Newbie Question - Creating Data Source for CSV text file

2000-08-11 Thread Gene Kraybill

 From:  "Philip Arnold - ASP" [EMAIL PROTECTED]

 You can use CSV files for ODBC datasource, but don't! The main reason is
 that ODBC holds onto sources like that once it's got them
 
 Make a link table in Access which talks to the CSV - this is the much
 preferred solution as you can actually run SQL queries on the data

I'd be interested in hearing a few more details on this... and info about the 
advantages 
of this over using CFHTTP to create a query object and then looping over the 
query to insert each record into a db...

Gene Kraybill


--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Error Handling

2000-08-11 Thread Gene Kraybill

[EMAIL PROTECTED] wrote:

 I looked a bit into that , but  I waant a message only for that error, and
 it doesn't seem like I can tell CFTRY to only catch the cfsearch error.
 Please tell me if I am wrong.

I've just started using CFTRY myself, but check out CFTHROW. It's my 
understanding you can use it along with some conditional code to "throw" any 
customized 
error message for any error condition at all...Your customized error will then be 
"caught" by CFCATCH at the bottom of the CFTRY block.

Gene Kraybill
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: CFTHROW

2000-08-11 Thread Gene Kraybill

Miriam Hirschman wrote: 

 How Do I define my own error in a cfthrow?  I would like to say if the error
 is an invalid search criteria then

Try something like this:

CFTRY
CFIF SearchCriteria IS Invalid
CFTHROW TYPE="MyCustomError" MESSAGE="Your Search Criteria are Invalid"
/CFIF
CFCATCH TYPE="MyCustomError"
#CFCATCH.Message#
/CFCATCH
/CFTRY

Basically the idea is to wrap the CFTHROW in conditional code so that it creates an 
error 
when certain conditions are met. You then "catch" the error by referring to it with 
the 
TYPE parameter using CFCATCH, and display the defined error message using 
CFCATCH.Message 
(and CFCATCH.Detail, if you define that as well).

Gene Kraybill
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



CFFile access problem

2000-08-10 Thread Gene Kraybill

We have a simple logging system on one of our sites,  and occasionally see this error:

 Error processing CFFILE
 Error attempting to write data to
 target file 'E:/Web/ThisSite/counter/ShowPage_8_Day10.log'.
 Error:  The file could not be accessed.

Given that this operation usually works, can we assume that an access problem is 
likely caused by server overload?

Any way of dealing with this on a shared server, other than lessening the server load?

Gene Kraybill
LPW  Associates


--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: CFFile access problem

2000-08-10 Thread Gene Kraybill

Good point. I've noticed that some of the file contention problems 
seem to disappear if I use a loop to introduce a brief delay between a CFFILE Delete 
and 
a CFFILE Write operation on the same file. Is that to be expected, and should CFLOCK 
solve that problem (it seems that there are still some file contention or access 
problems).

Gene Kraybill

 from [EMAIL PROTECTED]

 It could be contention for that file by your application. You could either
 CFLOCK that CFFILE operation, or if you don't mind losing some writes you
 could use CFTRY/CFCATCH to prevent end users from seeing the error.
 
 From: Gene Kraybill [mailto:[EMAIL PROTECTED]]
 
 We have a simple logging system on one of our sites,  and occasionally see
 this error:
 
  Error processing CFFILE
  Error attempting to write data to
  target file 'E:/Web/ThisSite/counter/ShowPage_8_Day10.log'.
  Error:  The file could not be accessed.
 
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: file name

2000-08-09 Thread Gene Kraybill

"Jay Wigginton" [EMAIL PROTECTED] wrote:

 Could some please tell me the file name that if present in a directory will
 be executed after the current template...

OnRequestEnd.cfm

Gene Kraybill
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: DE() vs Evaluate() when doing a variable number of multiple

2000-08-03 Thread Gene Kraybill

 "Christopher S Martin" [EMAIL PROTECTED] wrote:

 cfset Measurement = Evaluate(form.IngredientMeasurement  x)
 cfset Description = Evaluate(form.IngredientDescription  x)
 I get an error saying the
 parameter form.ingredientMeasurement cannot be resolved. 

Try this instead:
cfset Measurement = Evaluate("form.IngredientMeasurement"  "#x#")
cfset Description = Evaluate("form.IngredientDescription"  "#x#")

Gene Kraybill

-
Gene Kraybill
LPW  Associates LLC
www.lpw.net
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Complex Arrays and Structures

2000-08-02 Thread Gene Kraybill

Looking for some peer review or alternative ideas on the following...

I'm working on a rather complex B2B CF application where we basically want to have a 
single set of code drive different customized "versions" of the application based on a 
whole bunch of config settings. This is for an ordering system that will meet the 
varying
needs of, say, 20 large corporate trading partners. Set a bunch 
of config options for a certain customer, and the app will show certain products and 
display and process data in a customized way.

The approach we've been working on is to create a large application structure to hold 
the 
configuration settings for each customer. The key in the first dimension would be the 
customer ID number.

The main config options are numbered, so Customer 1's second config option (set to 
Yes or No) would be referenced in a struct like this:
#Application.Str_ConfigCust["1"]["2"]#

Now we also need to store various other string, array and query data for quick 
on-the-fly 
access, so we're looking at also storing that at the second dim, such as:

#Application.Str_ConfigCust["1"]["OtherDataArray"]# 
#Application.Str_ConfigCust["1"]["SomeSimpleString"]#
#Application.Str_ConfigCust["1"]["SomeQuery"]#

We also need to hold the order form data, and there can be multiple forms, so I 
figured 
there could be a "Form" struct at the second dimension that holds array data for each 
form.

So  
#Application.Str_ConfigCust["3"]["Form"]["2"]["FormItemsArray"][5][8]# would reference 
the form items on row 5, column 8 on Customer 3's Order Form No. 2.

I've never attempted to use arrays, structs and queries to this level of complexity, 
or 
mix and match them like this in the same structure. The advantage it seems to offer is 
that all config data will be held in a single structure, and it'll be easy to 
reference 
it by customer number and loop over it when needed. But it's also rather complex and 
the 
var references are long and unwieldy, so I'm having second thoughts. Also, I need to 
figure out whether storing all this config data in an application structure will cause 
memory problems. None of these arrays or queries are very large, but still...

Any general comments/ideas/brickbats anyone? And how could we roughly estimate how 
much 
memory a complex structure like this will require?

Gene Kraybill
LPW  Associates
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: CFHTTP

2000-08-02 Thread Gene Kraybill

"Kevin Queen" [EMAIL PROTECTED] wrote:

 I was looking into CFHTTP and was wondering if I could use it to load a page
 without displaying said page.

No problem. Just include a CFHTTP tag pointing to the desired page, but skip the 
normal step of using CFHTTP.FileContent to display the contents....

Gene Kraybill
LPW  Associates
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Custom Tag for Date and Time

2000-07-28 Thread Gene Kraybill

"James Taavon" [EMAIL PROTECTED] wrote:

 Any one have a custom tag that retrieves both the DateFormat (Now()) and
 TimeFormat (Now()) as one function that can be inserted into a database?

Why format it before putting it into the db? Would it work for you to simply capture 
the 
current date and time using NOW and insert that as a date-time object into a single 
database field?

Something like:

MyDateTime=#CreateODBCDateTime(Now())#

Gene Kraybill
LPW  Associates LLC
Mansfield, PA
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Milking every last drop of CF performance...

2000-07-27 Thread kraybill

 If it's a session variable, scope it as such. Otherwise, use the appropriate
 scope of the variable you're working with, such as:
 
 Regular variables: VARIABLES.blah ...

Casual tests I've done show no significant performance increase by scoping 
regular variables. Undoubtedly this is because CF looks to the variables scope first.  
So 
I've adopted the policy of scoping everything EXCEPT regular variables. I figure that 
keeps my template sizes a tad smaller and my code just a bit cleaner.

Gene Kraybill
LPW  Associates LLC
Mansfield, PA

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Parsing URLs on IIS 4

2000-07-25 Thread kraybill

Good question. Am I correct this error is actually a CF error?

Error Occurred While Processing Request
Error Diagnostic Information
An error has occurred.

HTTP/1.0 404 Object Not Found

Please inform the site administrator that this error has occurred (be sure to include 
the contents of this page in your message to the administrator).

...And if it is a CF error, does that suggest a solution?

Thanks
Gene Kraybill


[EMAIL PROTECTED] wrote:

 Are you getting IIS 404s or CF 404s? 
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Dynamic Variable

2000-07-24 Thread kraybill

Use this:

CFSET "button#i#" = "whatever"

or this: 

CFSET temp=SetVariable("button#i#", "whatever")

The first is easier, but the second is the "official" method...

Gene Kraybill
LPW  Associates
Mansfield, PA

"Kevin Schmidt" [EMAIL PROTECTED] wrote:

 I have kind of a stupid question.  I need to create a dynamic variable =
 in a loop with the counter number attached to the end of the variable. =
 So I get button1 button2 buttton3 etc
 
 I am not exactly sure the syntax CFSET button + i =3D #button_name# =
 ain't cutting it.
 
 Let me know what the exact syntax is!
 
 Thanks
 Kevin Schmidt
 
 
 --=_NextPart_000_0C0B_01BFF586.985C45B0
 Content-Type: text/html;
   charset="iso-8859-1"
 Content-Transfer-Encoding: quoted-printable
 
 !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
 HTMLHEAD
 META content=3D"text/html; charset=3Diso-8859-1" =
 http-equiv=3DContent-Type
 META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR
 STYLE/STYLE
 /HEAD
 BODY bgColor=3D#ff
 DIVFONT face=3DArial size=3D2I have kind of a stupid question.nbsp; =
 I need to=20
 create a dynamic variable in a loop with the counter number attached to =
 the end=20
 of the variable. So I get button1 button2 buttton3 etc/FONT/DIV
 DIVnbsp;/DIV
 DIVFONT face=3DArial size=3D2I am not exactly sure the syntax =
 lt;CFSET button +=20
 i =3D #button_name#gt; ain't cutting it./FONT/DIV
 DIVnbsp;/DIV
 DIVFONT face=3DArial size=3D2Let me know whatnbsp;the exact syntax=20
 is!/FONT/DIV
 DIVnbsp;/DIV
 DIVFONT face=3DArial size=3D2Thanks/FONT/DIV
 DIVFONT face=3DArial size=3D2Kevin =
 SchmidtBR/FONT/DIV/BODY/HTML
 
 --=_NextPart_000_0C0B_01BFF586.985C45B0--
 
 --
 Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
 To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
 
 
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Path_Info problem

2000-07-21 Thread kraybill

Thanks, Adam. In our case, we aren't actually using .htm at the end of the 
slash-delimited query string. It's just like this:

www.mysite.com/fuseaction/GetPage/PageID/12

Someone said SP6a causes a problem with this kind of string. Not sure yet which SP our 
host has on this server, but has anyone found a way to use this kind of 
slash-delimited 
query strings with IIS Server4 SP6a?

Gene Kraybill

From:  "Reynolds, Adam" [EMAIL PROTECTED]

 I think we ran into a similar problem. This has to do with IIS Server 4 SP6.
 It works slightly differently. We had to remove all '.htm' from the end of
 the urls. 
 
 Erki suggested that these could be replaced with .cfm but we haven't tried
 this yet.

  [EMAIL PROTECTED][SMTP:[EMAIL PROTECTED]]

  We often use slash-delimited query strings to make pages more visible to
  search engines:
  
  Example: www.mysite.com/fuseaction/GetPage/PageID/12
  
  In May, one of our sites suddenly started throwing "404 Object Not Found"
  errors. Our 
  hosting provider eventually gave up trying to implement a Microsoft IIS 4
  fix (relating 
  to the Path_Info cgi variable), and simply moved the site to another
  server, unable to 
  fix the actual problem.
  
  Now, another of our sites is doing the same. It's strange:
  
  www.greenthumbsup.com/index.cfm  WORKS
  
  But if you click on one of the main sections of that site (with
  slash-delimited query 
  string), you'll get a 404 error. Then hit the Back button and refresh the
  original 
  index.cfm page, and you'll STILL get the 404 error, even tho the same page
  was accessible 
  just a minute before...
  
  Would appreciate anyone who might take a minute, run that experiment, and 
  pass along any theories as to exactly what's happening...
  
  Gene Kraybill
  LPW  Associates
  Mansfield, PA
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Path_Info problem

2000-07-20 Thread kraybill

We often use slash-delimited query strings to make pages more visible to search 
engines:

Example: www.mysite.com/fuseaction/GetPage/PageID/12

In May, one of our sites suddenly started throwing "404 Object Not Found" errors. Our 
hosting provider eventually gave up trying to implement a Microsoft IIS 4 fix 
(relating 
to the Path_Info cgi variable), and simply moved the site to another server, unable to 
fix the actual problem.

Now, another of our sites is doing the same. It's strange:

www.greenthumbsup.com/index.cfm  WORKS

But if you click on one of the main sections of that site (with slash-delimited query 
string), you'll get a 404 error. Then hit the Back button and refresh the original 
index.cfm page, and you'll STILL get the 404 error, even tho the same page was 
accessible 
just a minute before...

Would appreciate anyone who might take a minute, run that experiment, and 
pass along any theories as to exactly what's happening...

Gene Kraybill
LPW  Associates
Mansfield, PA

PS. The possible MS fix I referred to is at 
http://support.microsoft.com/support/kb/articles/Q184/3/20.ASP?LN=EN-USSD=gnFR=0
For some reason our hosting provider, a major provider that has been recommended on 
this 
list, could not figure out how to actually implement it...
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Select list Question and javascript

2000-07-17 Thread kraybill

Kelly Olson wrote:

 I have a Select list which is pulling records from an access database.
 What I am trying to accomplish is display a SELECT BELOW option as the
 first item in the list.
 The way I have done it so far is to make a first record in the actuall
 database of select below.  Then
 when it displays it it there.( crude but effective )

Place an additional OPTION before you output the results of your query. Something 
like 
this:

SELECT NAME="MySelectList"
OPTION-- Make Your Selection --
CFOUTPUT QUERY="MyQuery"
OPTION#MyQuery.ColumnName#
/CFOUTPUT
/SELECT

Gene Kraybill
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Passing a variable through the URL

2000-07-16 Thread kraybill

 In my application.cfm I have the following line of code:
 
 CFSET APPLICATION.ADDTOKEN = "cfid=#client.cfid#cftoken=#client.cftoken#"
 
 Now, there are login forms all over my site so people can login...  if they
 put their email and their password in, it should pass their email through
 the URL...  The form that they type email in is a textbox simple called
 "Email."  So how would I then append this to the APPLICATION.ADDTOKEN?

Chris:

I assume you're creating the AddToken in order to track users via URLs. If so, why 
not use #Session.URLToken#, which CF creates automatically in the Session scope, 
keeping 
the assignment linked to a specific user rather than overwriting an Application 
variable 
visible to ALL users. Unless there is never more than one concurrent user, I would 
think 
there's the potential for one user's CFID and CFTOKEN to get associated with another 
user if you assign those tracking numbers to an application variable and then add 
that variable to one or more URLs. 

To append the email adr to the combined cfid/cftoken var, you could do something like 
this in your application.cfm:

CFSET Session.MyToken=Session.URLToken
CFIF IsDefined("Form.Email")
CFSET Session.MyToken="#Session.MyToken#""#Form.Email#"
/CFIF

Gene Kraybill
LPW  Associates
-
Gene Kraybill
LPW  Associates LLC
www.lpw.net
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Forms question

2000-07-16 Thread kraybill

"Gary McNeel, Jr." [EMAIL PROTECTED] wrote:

 Is there a way to nest forms?

 I know I can to this programmaticly with CF by looking at values, was hoping
 for a faster way.

Nope, no way to nest forms. Javascript may be the way to speed things up if you need 
to 
look up some data for part of your form...

Gene Kraybill
LPW  Associates
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Odd Question

2000-07-12 Thread kraybill

Should your addtoken var be in the Application scope? That will assign the 
same CFID and CFTOKEN to all users...

CF automatically creates Client.URLToken and Session.URLToken, similar to your 
assignment below, so you don't need to do that manually.

You could try something like this:

CFSET Session.Mytoken="#Session.URLToken#"
CFIF IsDefined("Form.CustomerID")
CFSET Session.Mytoken="#Session.URLToken##Form.CustomerID#"  
/CFIF

Gene Kraybill
---
"Chris Farrugia" [EMAIL PROTECTED]:

 I have an application.cfm and a form on a page.  Now, if they fill in the
 form, they then have a CustomerID variable defined...  in my application.cfm
 I have the following line:
 
 CFSET APPLICATION.ADDTOKEN = "cfid=#client.cfid#cftoken=#client.cftoken#"
 
 Now, how could I put the customerID to the end of the addtoken if and only
 if it exists?  So it isn't there until they fill out the form... then on
 every page it is there...?  How would I do this?
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: pass variables

2000-07-12 Thread kraybill

"janey smith" [EMAIL PROTECTED]

 i have a problem passing variables to an edit page, it passes the field 
 pol_question fine but for the answer fields my loop is incorrect, it just 
 reproduces the answers 5 times each. each answer is the ans_answer table is 
 related to the pol_question through the pol_id, any help would be 
 appreciated.

Try consolidating your code, combining the hidden vars and the input fields into a 
single 
loop. You were getting 5 answers for each loop because loops do what they are supposed 
to 
do: they loop through an entire query set. I didn't take the time to fully decipher 
the page you're trying to build, but you ought to be able to build it with only 
one or two loops and a few lines of code. Something along these lines:

CFLOOP QUERY="GetAnswers"
input type="hidden" name="ans_id#GetAnswers.CurrentRow#" 
value="#GetAnswers.ans_id#"
pAnswer #GetAnswers.CurrentRow#:
input type="text" name="answer#GetAnswers.CurrentRow#" size="45" 
value="#GetAnswers.ans_Ans#"
/CFLOOP

Gene Kraybill
LPW  Associates
Mansfield, PA
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: cfmail

2000-07-12 Thread kraybill

Tim Bahlke wrote: 

 I have never had luck getting cfmail to work.  How does this look to y'all:
 
 CFMAIL TO="[EMAIL PROTECTED]" FROM="[EMAIL PROTECTED]" SUBJECT="Order
 #URL.sessionid#" SERVER="server1.clicktex.com"

Don't know if this is your problem, but some mail servers are set up to disregard 
messages posted from an address outside that domain, to prevent unauthorized people 
from 
using that server to send mail. 

Gene Kraybill
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



OT: Help with HTTPSniffer

2000-07-11 Thread kraybill

I'm trying to use the HTTPSniffer (a Perl program) to debug a problem with CFHTTP and 
have a few basic questions about its use. Looking for someone who's used it to email 
me 
off-list for a bit of help...

Thanks

Gene Kraybill
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Developer Conference: Hotel Accommodations

2000-07-10 Thread kraybill

I used Priceline for that e-commerce conf  and got a room at the Marriot for about 
$50...

Gene Kraybill

James Brown wrote:

 Several people who went to the e-commerce meeting in Rockville a couple
 of months ago used priceline and got some pretty good deals on both
 flight and room ($80 a nite for the Rockville Marriot).
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Another CFHTTP challenge

2000-07-10 Thread kraybill

Can't quite figger this one out...

I have a page that uses one CFHTTP POST to do an automatic login to another site, and 
a 
second CFHTTP POST on the same page to pass parameters and request a secure page.

The login always succeeds but the second CFHTTP gets kicked right back to the login 
screen on the FIRST try -- if I've just restarted CF. On the second try, assuming I 
haven't restarted the CFServer, the login and page request BOTH work as desired.

Seems it must have something to do with the passing of CFID/CFTOKEN via cookies, but I 
could use some suggestions for further diagnosis/correction...

Thanks!

Gene Kraybill
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Using Select Tags in optional Form Submissions

2000-07-06 Thread kraybill

A select box will always result in a value being passed to the "action" page. I'd 
suggest
you use an initial OPTION something like this:

SELECT name="Department"
OPTION value="0"Select a Department
OPTIONDepartment 1
 OPTIONDepartment 2
etc
/SELECT

Then on your action page, do a CFIF test for Department, and if it's not 0, you know 
they
made a department selection...

Gene Kraybill

Angél Stewart [EMAIL PROTECTED] wrote:

 I have a form, with four text boxes and a select box that is pulling data
 from a Department Table to get available departments and their Department
 IDs.

 Now, the user can eitehr enter an Employee Name, ID, or select a department.
 However, on the next page I have several CFIF IsDefined tags to check
 which field has a value in it, so that I know what to build the query on.

 It's one or the other, they can't enter a Name, and an ID...AND a department
 (wouldn't make sense to do that anyways heh heh).

 But...for some reason the Department is always carried forward,even if the
 user makes no selection.
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebarRstsbodyRsts/cf_talk or send a message 
to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: CF and Crystal Reports

2000-07-06 Thread kraybill

This may not be as sophisticated as you'd like, but the simplest way to generate bar
charts is to have your code generate a table where the background of each row has a
different BGCOLOR and the size of the "bar" on each row is controlled dynamically by
setting the WIDTH parameter of the TDs, using a percentage or a number. If you have 
any 
trouble with the sizing, you could plop a one-pixel graphic via an IMG SRC in each 
cell, 
and set the WIDTH or HEIGHT to stretch it to the required size for your bar....

Gene Kraybill
LPW  Associates
Mansfield, PA

"Wong, Phoebe" [EMAIL PROTECTED] wrote:

 I'm looking for a way to generate bar charts on the fly, based on a PIN
 submitted by a User.
 
 Is there, for instance,  a way to pass a parameter from a ColdFusion
 template to Crystal Reports in order to generate bar charts on the fly? 
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



What an Array Looks Like

2000-07-03 Thread kraybill

A few holiday thoughts on arrays...

Coming from a non-programmer background, I found arrays rather 
intimidating until I began to realize how similar they are to everyday items:

One-dimensional array: like a numbered list.
Two-dimensional array: like a spreadsheet or table with cell references based on row 
and 
column.
Three-dimensional array: like a cube with cell references based on 3 dimensions.

Of course, I know that in CF, arrays are dynamic --  each "row" of a 2 dimensional
array can be a different length. A 2-dim array is really just a one-dimensional array
where each cell is occupied by a one-dimensional array of any length.

Although I've often heard it said that it's difficult to visualize arrays of more than 
3-dimensions, I wonder if a game we used to play as children might helpIt was 
called 
Quad, and was basically a multi-tiered Tic-Tac-Toe game -- multiple levels of rows and 
columns. So, ignoring the fact that CF arrays don't necessarily have the same number 
of 
elements in each dimension, I'd be interested in feedback on whether the following 
models accurately portray complex arrays:

Three-dimensional array: Like a "Quad" game. Example: MyArray[2][3][1] means  the data 
that's stored on the second level of the game, third row and first column.

Four-dimensional array: Like a single-file lineup of Quad games. MyArray[5][2][3][1] 
means  the data that's stored on the fifth game in the lineup, second level, third row 
and first column.

Five-dimensional array: Like a big checkboard with a Quad game sitting on each square. 
MyArray[4][5][2][3][1] means  the data that's stored in the game that's sitting on the 
fourth row and fifth column of the checkerboard, and on that game, the data is in the 
second level, third row and first column.

Six-dimensional array: Like a huge Quad game, with each square occupied by a Quad game 
of 
its own. MyArray[2][4][5][2][3][1] means  the data that's stored in the game found on 
the 
second level, fourth row and fifth column of the huge Quad game, and on 
that game, the data is in the second level, third row and first column.

I could keep going... 7 dimensions would be like a string of huge quad games, with 
each 
of the huge quad games having each of their cells occuped by a Quad game...Seems like 
you 
could keep going forever...

Accurate depiction? Next question: When would you need a 7-dimension array?

Gene Kraybill 
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Looping through an Array

2000-06-30 Thread kraybill

Taking this one step further, I'd be interested in seeing an example of the best way 
to 
loop through a 3-dim array. ArrayLen only shows the length of the first dimension - 
how 
do you determine the size of the 2nd and 3rd?

Gene Kraybill

  Is there a way that i can loop through an array and display 
  all the items
 
 Why, certainly:
 
 cfloop index="i" from="1" to="#ArrayLen(myarray)#"
   cfoutputItem #i#: #myarray[i]#/cfoutputbr
 /cfloop
 
 Dave Watts, CTO, Fig Leaf Software
 http://www.figleaf.com/
 voice: (202) 797-5496
 fax: (202) 797-5444
 --
 Archives: http://www.eGroups.com/list/cf-talk
 To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
 
 
-
Gene Kraybill
LPW  Associates LLC
www.lpw.net
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Array Size - How?

2000-06-29 Thread kraybill

Basic question: I have a 3 dimensional array that is constructed dynamically. How can 
I 
determine the size of each dimension so I can do some nested loops to display the 
contents of the array? I'm trying to do something like this:

CFLOOP index="Dim1Counter" FROM=1 TO=
CFLOOP INDEX="Dim2counter" FROM=1 TO=?
#MyArray[#Dim1Counter#][#Dim2Counter#][1]#  
#MyArray[#Dim1Counter#][#Dim2Counter#][1]#
/CFLOOP
/CFLOOP

Gene Kraybill
-----
Gene Kraybill
LPW  Associates LLC
www.lpw.net
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Is it possible to have a preview of records before going liv

2000-06-29 Thread kraybill

"Jeff Fongemie" [EMAIL PROTECTED] wrote:

My client wants a way to add the text, hit enter,  then preview 
 it with the ability to make changes before it goes live. After the 
 preview/change process he can hit another submit button to have the 
 info go live.

If he's going to preview and edit immediately following the addition of the new text, 
you could simply pass the text as form vars to a preview page. If he wants to make 
changes, he hits the Back button to return to the form, otherwise he hits a Publish 
button to save it to the db...

If he's not necessarily going to add text and preview it in the same session, you 
could 
save it to the db with a "Status field" in that table. When he's approved it, simply 
change the Status (e.g.) from 'Draft' to 'Live'. Set up your live pages to only pick 
up 
content with a status of Live...This keeps your content in a single table and avoids 
the 
hassles of two tables for essentially the same content... Only time you might want to 
use 
a second table is if he needs to be able to take LIVE content and rework it 
through multiple work sessions. In that case, you could reference the LIVE record as a 
foreign key in your DRAFT table, and when  he's done fiddling with the new version, 
simply update the LIVE record with the contents of its DRAFT equivalent...

Gene Kraybill
LPW  Associates
Mansfield, PA
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Scopes (WAS: RE: CFIF syntax debate (kind of...)

2000-06-28 Thread kraybill

  what kind of scopes are there?  Form, url, session... anything else?
 
 not forgetting Application, Attributes, Caller (already mentioned), CGI,
 Client, Cookie, Query Name, Request, Server, Variables

On the subject of scopes, I once accidentally used "Variable.whatever" rather than 
"Variables.whatever" and stumbled on the fact that you can start vars with any 
"scope-like" dot notation name. This could potentially be useful, e.g., in the Fusebox 
methodology you set global vars via an included file... You could name such vars like 
this: "appglobals.whatever" so the origin of the var would be instantly clear on 
subsequent references in other templates. Of course, "appglobals.*" is 
not really a new scope -- it's simply a var starting with "appglobals." that's 
actually 
in the "Variables" scope. A full reference would be "#variables.appglobals.whatever#". 
Anyone see any problem with such scope-like notation?

Gene Kraybill
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Ben's CF DHTML menus

2000-06-25 Thread kraybill

Anyone have any idea why Ben Forta's DHTML menus refuse to display  if I add an 
"onLoad" eventhandler to the page's body tag?

Here's what kills the menus:

BODY onLoad="window.document.TransactionForm.DateTransacted.focus()"

Can't figger it out...

Gene Kraybill
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



OT: SQL - Ordering an 'IN'

2000-06-17 Thread kraybill

Is there a way in SQL to have the resultant query use the same sequence as 
the original items in an "IN" list, e.g.

WHERE Name IN ('John','Joe','Sarah')

I'm passing form elements and need to look up information on each and then redisplay 
them 
in the same order. Would be a lot easier if I can somehow force that IN clause to find 
the records in the original sequence...

Gene Kraybill
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



  1   2   >