This content has been marked as final. Show 4 replies
Unless you have set up your database in an unusual manner then SQL is either successful or throws an error.
hmm there is way around through triggers but that not what i am looking for . so CFQUERY it self is unable to return any status. interesting.
You could use cftry/cfcatch and write your own message of success. In fact, if your delete query has foreign key issues, this might not be a bad idea.
Actually a better idea is to delete the related records first.
If you are using SQL Server, read the Books Online under Help in SQL Query Analyzer. Look into @@ROWCOUNT, RAISERROR, BEGIN TRANSACTION, ROLLBACK TRANSACTION. Also look into CFTRANSACTION in CF.
A quick, simple way is to run a select immediately following the insert. If the record is there, the insert was successful.
This is just a quick and dirty way to check. There are better options.