473,385 Members | 1,877 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Test for corrupt tables

Does anyone have a function which can be used to check tables in a db for
corruption?
I want to run such a routine to ensure that backups are not being saved with
corrupt data.

--
Bob Darlington
Brisbane
Oct 4 '06 #1
5 1993
Hello,

I've wrote a simple command line utility (DBChecker) that can check,
repair and backup a ms-access database file. You can find it at

http://www.webalice.it/barozza/database_checker.htm

I hope it could be right for you.

bye!

Bob Darlington wrote:
Does anyone have a function which can be used to check tables in a db for
corruption?
I want to run such a routine to ensure that backups are not being saved with
corrupt data.


Oct 4 '06 #2
Thanks Alex. I'll give it a run tomorrow.

--
Bob Darlington
Brisbane
"Alex" <b_***********@interfree.itwrote in message
news:79********************************@www.proges is.net...
Hello,

I've wrote a simple command line utility (DBChecker) that can check,
repair and backup a ms-access database file. You can find it at
http://www.webalice.it/barozza/database_checker.htm

I hope it could be right for you.

bye!

Bob Darlington wrote:
>Does anyone have a function which can be used to check tables in a db for
corruption?
I want to run such a routine to ensure that backups are not being saved
with corrupt data.



Oct 5 '06 #3
Bob Darlington wrote:
Does anyone have a function which can be used to check tables in a db for
corruption?
I want to run such a routine to ensure that backups are not being saved with
corrupt data.
FWIW I use the code below to scan a single table for bad records. It's
set up to send output to a form, but you could easily modify it to
debug.print.

Public Sub FindBadRecord()
On Error GoTo ErrBadRecord
Dim RS As DAO.Recordset
Dim i As Long
Dim j As Long
Dim tmpx As Variant
Dim SQL As String
With Form_frmDebugger.txtDebugWindow
.Text = "Running..." & vbCrLf
SQL = "SELECT * " & _
"FROM [MyTable]" & _
"ORDER BY [MyTable].[RecID];"
Set RS = CurrentDb.OpenRecordset(SQL)
RS.MoveFirst
Do While Not RS.EOF
' Debug.Print "Reading fields at record # " & RS.Fields(0)
j = j + 1
If j Mod 1000 = 0 Then .Value = .Value & "Read " & j & "
records OK."
For i = 0 To RS.Fields.Count - 1
tmpx = RS.Fields(i).Value
Next i
ResumeBadRecord:
RS.MoveNext
DoEvents
Loop
.Text = .Value & "Done" & vbCrLf
Set RS = Nothing
Exit Sub
ErrBadRecord:
.Text = .Value & "*** Error at [RecID] " &
RS.Fields(0).Value & vbCrLf
.Text = .Value & "*** Error details: " & Err & " " & Error &
vbCrLf
.Text = .Value & vbCrLf
Resume ResumeBadRecord
End With
End Sub

--
Smartin
Oct 5 '06 #4
Alex,
Sorry about the delay getting back to you.
Many thanks for your solution. It was exactly what I was looking for.

--
Bob Darlington
Brisbane
"Alex" <b_***********@interfree.itwrote in message
news:79********************************@www.proges is.net...
Hello,

I've wrote a simple command line utility (DBChecker) that can check,
repair and backup a ms-access database file. You can find it at
http://www.webalice.it/barozza/database_checker.htm

I hope it could be right for you.

bye!

Bob Darlington wrote:
>Does anyone have a function which can be used to check tables in a db for
corruption?
I want to run such a routine to ensure that backups are not being saved
with corrupt data.



Oct 16 '06 #5
Bob Darlington ha scritto:
Alex,
Sorry about the delay getting back to you.
Many thanks for your solution. It was exactly what I was looking for.
OK Bob, you're welcome!
bye, Alex

--

questo articolo e` stato inviato via web dal servizio gratuito
http://www.newsland.it/news segnala gli abusi ad ab***@newsland.it
Oct 19 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Amy DBA | last post by:
OK, I'm stumped now. I need help restoring a tablespace that has been marked offline. Here's a little background on the problem: 1) There was a hardware failure that caused the tablespace to...
4
by: aaj | last post by:
Hi all I have been given a corrupt access 2000 backend and asked to salvage the data.(youve gussed it, no backup) On trying to open it just kicks me out saying its not a valid database file -...
21
by: Dan | last post by:
Hi, just ran into my first instance of a backend Access97 database not compacting. I'm getting the "MSACCESS.EXE has generated errors.." message on compact. I've narrowed it down to the largest...
6
by: Annette Massie | last post by:
I have an 2000 database that is getting corrupt many times a day. The application is sittin on a network with about 5 users accessing it. Most times I get a call with the user saying the...
9
by: Bungle | last post by:
Hi There, Does anybody know where i might be able to locate a tool/application that can determine whether a Database is corrupt?? Also, can a bad network connection cause a corruption to a...
3
by: Jenny Zhang | last post by:
I just upgraded to 7.4.1. I was loading my database using 'copy'. Some tables loaded with no problem, while some gave me the error: === ERROR: end-of-copy marker corrupt CONTEXT: COPY author,...
3
by: JensT | last post by:
Help My database acts very strange I have a table named T1. (And a lot of other Tables, queries etc.) Here my database works fine. Then I renamed a table from T1 to T1_imp, and created a...
0
by: Mike | last post by:
How can i handle "attempted to read or write protected memory. this is often an indication that other memory is corrupt" I use VS 2005 framework 2.0 On the server explorer window I try to open...
0
by: Phil Stanton | last post by:
Sorry to repost this but I now seem to have the BE datbase corrupted. I have a FE, BE database on my home computer and a duplicate on the office computer. Both use Ak2 on Windows XP. The one at...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.