It struck me like lightning what Ryan was trying to say 15 seconds before
Ryan emailed me, but I did not know the use of cftry and cfcatch so you both
helped. It works now. That has been bothering me for 3 days. You guys are an
awsome resource! Thanks for the input.
A.
- Original Message -
From: Matthew W Jones [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 31, 2001 4:47 PM
Subject: RE: [KCFusion] debugging
cfset commitit = true
cftry
cftransaction action=begin
cfquery name=getCatNums datasource=perspectives
Select Cat_Num
From Categories
Where Categories.Category = '#trim(Form.Category)#';
/cfquery
cfoutput query=getCatNums
CFQUERY NAME=two DATASOURCE=perspectives
INSERT INTO questiontest(question,Cat_num)
VALUES
('#Form.question#',#val(cat_num)#)
/cfquery
/cfoutput
cfcatch type=database
cftransaction action=rollback/
cfset commitIt = False
/cfcatch
cfif commitIt
cftransaction action=commit/
cfelse
cfset commitIt = True
/cfif
/cftransaction
/cftry
-Original Message-
From: Adaryl Wakefield [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 31, 2001 4:53 PM
To: [EMAIL PROTECTED]
Subject: Re: [KCFusion] debugging
Thats the easy part. How you get form data for the second column to go
with
it?
A.
- Original Message -
From: Ryan Hartwich [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 31, 2001 4:43 PM
Subject: RE: [KCFusion] debugging
Try doing a select on the column you need and using the result when you
insert into the 2nd table.
Ryan
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Adaryl Wakefield
Sent: Tuesday, July 31, 2001 4:38 PM
To: [EMAIL PROTECTED]
Subject: Re: [KCFusion] debugging
No good. I should have explained better. I need to throw information
collected from a form into four related tables. I cannot find any kind
of
example to do this. The problem I am running into is I have four
statements
wrapped in cftransaction tags but each insert statement is creating its
own
row instead of one cell of exported data and one cell of collected form
data
all in one row.
In pseudo code
Insert into table A two columns
one column is form data
the second column is collected from a previous table (the foreign
key
for table A)
__
The KCFusion.org list and website is hosted by Humankind Systems, Inc.
List Archives http://www.mail-archive.com/cf-list@kcfusion.org
Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
To Subscribe mailto:[EMAIL PROTECTED]
To Unsubscribe mailto:[EMAIL PROTECTED]
__
The KCFusion.org list and website is hosted by Humankind Systems, Inc.
List Archives http://www.mail-archive.com/cf-list@kcfusion.org
Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
To Subscribe mailto:[EMAIL PROTECTED]
To Unsubscribe mailto:[EMAIL PROTECTED]
__
The KCFusion.org list and website is hosted by Humankind Systems, Inc.
List Archives http://www.mail-archive.com/cf-list@kcfusion.org
Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
To Subscribe mailto:[EMAIL PROTECTED]
To Unsubscribe mailto:[EMAIL PROTECTED]
__
The KCFusion.org list and website is hosted by Humankind Systems, Inc.
List Archives http://www.mail-archive.com/cf-list@kcfusion.org
Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
To Subscribe mailto:[EMAIL PROTECTED]
To Unsubscribe mailto:[EMAIL PROTECTED]