Sorry, I should have put the query
> An insert statement (which is what I assume you are doing) doesn't
> return a recordset.
I am doing an insert, but I'm doing a Query after the insert to see if it's been added. In the code, "add_check" is the query name. Here's the query:
<cfquery name="add_check" datasource="dpch">
SELECT ce_index,ce_orgname FROM careerexpo2004
WHERE ce_email = '#Form.ce_email#'
</cfquery>
<CFOUTPUT>
add_check.recordcount:#add_check.recordcount# <!--- displays correct record count, 8 for example--->
<cfif add_check.recordcount GT 0>
Your company information has been added. Click to <A HREF="" target="_self">add another</A>.
<cfelse>
Your company information has been was not added. Click to <A HREF="" target="_self">try again</A>.
</cfif>
>You might want to create a stored proc that
> returns an output param back to CF indicating that the insert either
> failed or succeeded.
>
> HTH,
>
> --
> Jeff Garza
> ----- Original Message -----
> From: daniel kessler
> To: CF-Talk
> Sent: Friday, July 30, 2004 10:44 AM
> Subject: GT 0 failing CFIF decision
>
>
> I run a query to see if some items are inserted into an Oracle DB. If
> the record count is greater than 0, I consider it added. In the code
> below, I'm displaying the recordcount and it's being listed as 8, but
> I'm failing the GT 0 IF statement.
>
> Can someone please tell me why this is failing?
>
> add_check.recordcount:#add_check.recordcount#
> <cfif add_check.recordcount GT 0>
> Your company information has been added. Click to <A
> HREF="" target="_self">add another</A>.
> <cfelse>
> Your company information has been was not added. Click to <A
> HREF="" target="_self">try
> again</A>.
> </cfif>
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
[Donations and Support]
- GT 0 failing CFIF decision daniel kessler
- Re: GT 0 failing CFIF decision Jeff Garza
- Re: GT 0 failing CFIF decision daniel kessler
- Re: GT 0 failing CFIF decision daniel kessler
- RE: GT 0 failing CFIF decision Dave Watts
- Re: GT 0 failing CFIF decision daniel kessler
- Re: GT 0 failing CFIF decision Aaron Rouse
- RE: GT 0 failing CFIF decision Ryan Duckworth
- RE: GT 0 failing CFIF decision George Collman
- RE: GT 0 failing CFIF decision Dave Watts