I have just deleted all records in a clients tables(Access 97). As I understand it, the files are not deleted but marked for deletion (as in foxpro). Can they be recalled/recovered or the pointer reset to undo the damage.<br><br>regards
<br><br>I don't thing so. There is a setting in Access that sets the prompts (or no prompt) for record deletions. Sorry but your records are gone for good. If you want your program to work this way; to mark records as deleted vs. actual<br>deletion it's up to you, the programmer, to create this action.<br><br>We live and learn. <p>Amiel<br><a href=mailto:amielzz@netscape.net>amielzz@netscape.net</a><br><a href= > </a><br>
This is a posting I;ve had for some time: I have never needed it because I do daily backups <grin><br><br><On Thu, 15 Apr 1999 15:29:51 -0600, "Danny Lesandrini"<br><<A HREF="mailto:dlesandrini@hotmail.com">dlesandrini@hotmail.com</A>> wrote:<br><br><Danny,<br><br><Where were you two days ago when I reallllly needed you !!<br><br><This is probably the best example of the usefulness of <scanning most<br><if not all the messages in a UG.<br><br><BTW - this code is now recorded for future reference (mine <in any case<br><g>.<br><br><Sol.<br><br>>Paste the code below into a module, save it and run the function.<br>><br>>' This module contains simple Visual Basic for Applications function<br>>' that you can use to recover a table deleted from a Microsoft Access<br>>' for Windows 95 and Microsoft Access 97 database under the following<br>>' conditions:<br>>'<br>>' - The database has not been closed since the deletion of the table.<br>>'<br>>' - The database has not been compacted since the deletion of the table.<br>>'<br>>' - The table was deleted using the Microsoft Access user interface.<br>>'<br>>' NOTE: If multiple tables have inadvertently been deleted, this function<br>>' recovers only the last table that was deleted. The other tables are lost.<br>><br>><br>>Function UnDeleteTable(Optional strName As String)<br>><br>>Dim db As Database, strTablename As String<br>>Dim i As Integer, StrSqlString As String<br>><br>> If IsMissing(strName) Then strName = "MyUndeletedTable"<br>> Set db = CurrentDb()<br>><br>> For i = 0 To db.TableDefs.Count - 1<br>><br>> If Left(db.TableDefs(i).Name, 4) = "~tmp" Then<br>> strTablename = db.TableDefs(i).Name<br>> StrSqlString = "SELECT DISTINCTROW [" & strTablename & "].* INTO " &<br>>strName & " FROM [" & strTablename & "];"<br>> DoCmd.SetWarnings False<br>> DoCmd.RunSQL StrSqlString<br>> DoCmd.SetWarnings True<br>> MsgBox "A table has been restored as " & strName, vbOKOnly,<br>>"Restored"<br>> GoTo Exit_undo<br>> End If<br>> Next i<br>> MsgBox "No Recoverable Tables Found", vbOKOnly, "Not Found"<br>><br>>Exit_undo:<br>> Set db = Nothing<br>> Exit Function<br>>Err_undo:<br>> MsgBox Err.Description<br>> Resume Exit_undo<br>><br>>End Function<br>><br>><br>>--<br>>Danny Lesandrini<br>><A HREF="mailto:dlesandrini@hotmail.com">dlesandrini@hotmail.com</A><br>><br>
<br>Nice try, but it won't help. The code is for recovering deleted TABLES, not deleted RECORDS. If you delete the table object from the database window, then the code can recover it (if it was the last deleted object and you have not compacted). <br><br>Undeleting records is much trickier, and often impossible (in Acces version 95 and later) due to the lack of redundancy of information. although the data is still present, the problem is that the records are variable in length, as are all tect fields. Without knowing where a record begins or ends, it is not possible to identify its fields - at least not in an automated fashion. <p>Peter Miller<br><a href=mailtotek@pksolutions.com>ptek@pksolutions.com</a><br><a href=
Solutions Home</a><br>Expert services for all manner of low-level database file format issues<br>
(data recovery, security, meta-consulting, data acquisition, automation)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.