Where do you perform updates to these tables? What does your data look like
and how much data do you have? The code you have posted below looks sound,
perhaps somehow all your data was updated by an update query which then
would meet the delete criteria below.  It sounds highly unlikely, but you
have to look at all angles when trying to solve a problem that happens only
"once in a while".

I would start by finding the delete query which caused the problem in log
files, if you are logging each query executed, then work backwards to see
where an odd update may have occurred.

CC


                                                                                       
                                                
                      Tim Do <TDo                                                      
                                                
                      @lahd.lacity.org         To:      CF-Talk 
<[EMAIL PROTECTED]>                                            
                      >                        cc:                                     
                                                
                                               Subject: all records deleted from table 
                                                
                      02/04/03 04:30                                                   
                                                
                      PM                                                               
                                                
                      Please respond                                                   
                                                
                      to cf-talk                                                       
                                                
                                                                                       
                                                
                                                                                       
                                                




Hi all,

I ran into a big problem this morning when I found out that all the data
from my table were somehow deleted.  I wanted to make sure that it wasn't
my
code so I did an extended search for "delete from tablename" and "delete
tablename" in my code and I'm positive that there is only one instance that
I do a delete from this table.  I had this happen a long while ago to the
same exact table.  Here is my delete page, any ideas on how this could've
happened would be greatly appreciated.


<CFQUERY NAME="getTenantCoding" DATASOURCE="#rentDSN#">
             SELECT CItem
             FROM CodeOfUnits
             WHERE CItem=#CItem# AND UnitNo='#UnitNo#'
</CFQUERY>

<CFIF getTenantCoding.recordCount GT "1">

             <CFQUERY NAME="deleteTenatCoding" DATASOURCE="#rentDSN#">
                         DELETE CodeOfUnits
                         WHERE UnitNo='#UnitNo#' AND CItem=#CItem#
             </CFQUERY>

             <CFSET notice="Tenant info has successfully been deleted!">

<CFELSE>

             <CFQUERY NAME="deleteTenatCoding" DATASOURCE="#rentDSN#">
                         DELETE CodeOfUnits
                         WHERE UnitNo='#UnitNo#' AND CItem=#CItem#
             </CFQUERY>

             <CFQUERY NAME="deleteTenant" DATASOURCE="#rentDSN#">
                         DELETE Tenant
                         WHERE CImproveNo=#caseNo# AND UnitNo='#UnitNo#'
             </CFQUERY>

             <CFSET notice="Tenant info has successfully been deleted!">

</CFIF>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=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

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to