Depedns on what you mean successful 
If your just checking it happened wraping your query code in a CFtry and
catch will aid in basic error handling  

However you should look at cftransaction if you wish to do more than a
simple check 
With cftransaction you can roll a whole bunch of querys in to one logic
block and be able to rollback and do other nifty checks on the data
that would be a bit cumbersome to code 
For instance you could   CFTRY the insert ..  and cfcatch any errors
inside a transaction 
And then query the last record entered and match that data to what you
entered 
If it didn’t match then you could ROLLBACK the query in the transaction
block and have it do a error code cfm or anything you wanted .. ( yes
that’s over kill :O ) 

But I think you will find cftry and cfcatch enough for your means. 




-----Original Message-----
From: Lovelock, Richard J [mailto:[EMAIL PROTECTED] 
Sent: 17 October 2003 10:56
To: 'cflist'
Subject: [ cf-dev ] Check insert

   guys..what's the best way to check that a DB insert from a cfm page
has
been successful?

_______________________________________________________<?xml:namespace
prefix = o ns = "urn:schemas-microsoft-com:office:office" />

*  Regards, 
                Richard Lovelock 

Westminster City Council - Web Support
Cap Gemini Ernst & Young
Southbank
95 Wandsworth Road
London 
SW8 2HG 

(     0870 906 7482
 
_______________________________________________________

 


=======================================================
This message contains information that may be privileged or confidential
and is the property of the Cap Gemini Ernst & Young Group. It is
intended only for the person to whom it is addressed. If you are not the
intended recipient, youare not authorized to read, print, retain, copy,
disseminate, distribute, or use this message or any part thereof. If you
receive this message in error, please notify the sender immediately and
delete all copies of this message.
=======================================================


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.525 / Virus Database: 322 - Release Date: 09/10/2003
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.525 / Virus Database: 322 - Release Date: 09/10/2003
 


--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to