Cannot open database file - Err 3197

L

Luke Bellamy

Hi,
I have a Access2002 mdb file that I cannot open and I am 100% sure no one
else has it open.
There is some corruption present.
It gives the error:
3197 - The Microsoft Jet database engine stopped the process because you and
another user are attempting to change the same data at the same time.

So, I used JETCOMP.exe (ver 4.0) but that fails saying it cannot compact it.
Is this file dead or can I recover it?

Thankyou
 
T

Tom Wickerath

Hi Luke,

With Access closed, use Windows Explorer to navigate to the folder where this database is saved
to. With View > Details, do you see a small 1 KB locking database file? If you have Windows
Explorer set to shown known file extensions, this will have a .ldb extension. If you see such a
file, and Access is not running, then try to delete it. If your database is split into a
front-end / back-end, and these are stored in different folders, then make sure to check each
folder.

Tom
______________________________________


Hi,

I have a Access2002 mdb file that I cannot open and I am 100% sure no one else has it open.
There is some corruption present.

It gives the error:

3197 - The Microsoft Jet database engine stopped the process because you and
another user are attempting to change the same data at the same time.

So, I used JETCOMP.exe (ver 4.0) but that fails saying it cannot compact it.
Is this file dead or can I recover it?

Thankyou
 
L

Luke Bellamy

Thanks Tom but there is no ldb file.
Infact someone emailed me this small mdb data file only because it is
corrupt.
 
T

Tom Wickerath

Can you open your database if you hold down the shift key while attempting to open it. This
should allow you to bypass any startup forms or autoexec macros. The KB article below suggests
that you can get this error when a read is attempted with an OLE or MEMO data-type. Holding down
the shift key might allow you into the database, since no table reads should occur.

***************************************
From KB 182867 for Jet 3.5 databases: http://support.microsoft.com/?id=182867
(Likely applies to Jet 4.0 databases as well).
Error Number 3197:
Error message:

The Microsoft Jet database engine stopped the process because you and another user are attempting
to change the same data at the same time.
Cause/Problem:

This error typically occurs when a long value column (an OLE or MEMO data-type) has bad data
stored in it. Long value columns are typically stored in a separate page from the page that the
row is stored in. If a long value column is present in the table schema, the Jet database engine
will attempt to read the long value page when reading the row of data. In order to read the long
value page, there is a pointer in the row of data. This error is generated when the Jet database
engine cannot properly read the long value page from the pointer present in the data row. When
viewing a row that exhibits this behavior in Microsoft Access data-windows, the user will
typically see the number sign (#) for the entire row.

***************************************
If you can open your database with the shift key depressed, you might try this KB article:
http://support.microsoft.com/?id=815280

Another alternative that may allow you to recover the tables and queries, is to create a new
Access database. Make sure to set a reference to the Microsoft DAO 3.x Object Library, where 3.x
= 3.51 for Access 97 and 3.6 for Access 2000, 2002 or 2003. Then copy and paste the code shown
below into your new database.

Option Compare Database
Option Explicit

' This code requires a reference be set to the Microsoft DAO 3.x Object Library

Sub RecoverCorruptDB()

' Posted by Frank Miller, Microsoft Support Group, as a method of recovering tables & queries
'
http://groups.google.com/[email protected]

' This code should import all tables and queries from the damaged database
' into the current database. Note that this solution does not take secured
' databases into effect, so additional code to create workspaces, etc may be
' needed if the database has been secured.

Dim dbCorrupt As DAO.Database
Dim dbCurrent As DAO.Database
Dim td As DAO.TableDef
Dim tdNew As DAO.TableDef
Dim fld As DAO.Field
Dim fldNew As DAO.Field
Dim ind As DAO.Index
Dim indNew As DAO.Index
Dim qd As DAO.QueryDef
Dim qdNew As DAO.QueryDef
Dim strDBPath As String
Dim strQry As String

'Replace the path below to the path of the corrupted database
strDBPath = "C:\My Documents\Appraisals.mdb"

On Error Resume Next
Set dbCurrent = CurrentDb
Set dbCorrupt = OpenDatabase(strDBPath)
For Each td In dbCorrupt.TableDefs
If Left(td.Name, 4) <> "MSys" Then
strQry = "SELECT * INTO [" & td.Name & "] FROM [" & td.Name & "] IN '" &
dbCorrupt.Name & "'"
dbCurrent.Execute strQry, dbFailOnError
dbCurrent.TableDefs.Refresh
Set tdNew = dbCurrent.TableDefs(td.Name)

'Recreate the indexes on the table

For Each ind In td.Indexes
Set indNew = tdNew.CreateIndex(ind.Name)
For Each fld In ind.Fields
Set fldNew = indNew.CreateField(fld.Name)
indNew.Fields.Append fldNew
Next
indNew.Primary = ind.Primary
indNew.Unique = ind.Unique
indNew.IgnoreNulls = ind.IgnoreNulls
tdNew.Indexes.Append indNew
tdNew.Indexes.Refresh
Next
End If
Next

'Recreate the queries

For Each qd In dbCorrupt.QueryDefs
If Left(qd.Name, 4) <> "~sq_" Then
Set qdNew = dbCurrent.CreateQueryDef(qd.Name, qd.sql)
End If
Next
dbCorrupt.Close
Application.RefreshDatabaseWindow

MsgBox "Procedure Complete."
End Sub

_____________________________________


Hi Luke,

With Access closed, use Windows Explorer to navigate to the folder where this database is saved
to. With View > Details, do you see a small 1 KB locking database file? If you have Windows
Explorer set to shown known file extensions, this will have a .ldb extension. If you see such a
file, and Access is not running, then try to delete it. If your database is split into a
front-end / back-end, and these are stored in different folders, then make sure to check each
folder.

Tom
______________________________________


Hi,

I have a Access2002 mdb file that I cannot open and I am 100% sure no one else has it open.
There is some corruption present.

It gives the error:

3197 - The Microsoft Jet database engine stopped the process because you and
another user are attempting to change the same data at the same time.

So, I used JETCOMP.exe (ver 4.0) but that fails saying it cannot compact it.
Is this file dead or can I recover it?

Thankyou
 
L

Luke Bellamy

No Tom that doesn't work. But it would be that the database has a password
set and so that must read from a system table.
Thanks for your responses.

---------------
Luke Bellamy
Newcastle, Australia

Tom Wickerath said:
Can you open your database if you hold down the shift key while attempting to open it. This
should allow you to bypass any startup forms or autoexec macros. The KB article below suggests
that you can get this error when a read is attempted with an OLE or MEMO data-type. Holding down
the shift key might allow you into the database, since no table reads should occur.

***************************************
From KB 182867 for Jet 3.5 databases: http://support.microsoft.com/?id=182867
(Likely applies to Jet 4.0 databases as well).
Error Number 3197:
Error message:

The Microsoft Jet database engine stopped the process because you and another user are attempting
to change the same data at the same time.
Cause/Problem:

This error typically occurs when a long value column (an OLE or MEMO data-type) has bad data
stored in it. Long value columns are typically stored in a separate page from the page that the
row is stored in. If a long value column is present in the table schema, the Jet database engine
will attempt to read the long value page when reading the row of data. In order to read the long
value page, there is a pointer in the row of data. This error is generated when the Jet database
engine cannot properly read the long value page from the pointer present in the data row. When
viewing a row that exhibits this behavior in Microsoft Access data-windows, the user will
typically see the number sign (#) for the entire row.

***************************************
If you can open your database with the shift key depressed, you might try this KB article:
http://support.microsoft.com/?id=815280

Another alternative that may allow you to recover the tables and queries, is to create a new
Access database. Make sure to set a reference to the Microsoft DAO 3.x Object Library, where 3.x
= 3.51 for Access 97 and 3.6 for Access 2000, 2002 or 2003. Then copy and paste the code shown
below into your new database.

Option Compare Database
Option Explicit

' This code requires a reference be set to the Microsoft DAO 3.x Object Library

Sub RecoverCorruptDB()

' Posted by Frank Miller, Microsoft Support Group, as a method of recovering tables & queries
'
http://groups.google.com/[email protected]

' This code should import all tables and queries from the damaged database
' into the current database. Note that this solution does not take secured
' databases into effect, so additional code to create workspaces, etc may be
' needed if the database has been secured.

Dim dbCorrupt As DAO.Database
Dim dbCurrent As DAO.Database
Dim td As DAO.TableDef
Dim tdNew As DAO.TableDef
Dim fld As DAO.Field
Dim fldNew As DAO.Field
Dim ind As DAO.Index
Dim indNew As DAO.Index
Dim qd As DAO.QueryDef
Dim qdNew As DAO.QueryDef
Dim strDBPath As String
Dim strQry As String

'Replace the path below to the path of the corrupted database
strDBPath = "C:\My Documents\Appraisals.mdb"

On Error Resume Next
Set dbCurrent = CurrentDb
Set dbCorrupt = OpenDatabase(strDBPath)
For Each td In dbCorrupt.TableDefs
If Left(td.Name, 4) <> "MSys" Then
strQry = "SELECT * INTO [" & td.Name & "] FROM [" & td.Name & "] IN '" &
dbCorrupt.Name & "'"
dbCurrent.Execute strQry, dbFailOnError
dbCurrent.TableDefs.Refresh
Set tdNew = dbCurrent.TableDefs(td.Name)

'Recreate the indexes on the table

For Each ind In td.Indexes
Set indNew = tdNew.CreateIndex(ind.Name)
For Each fld In ind.Fields
Set fldNew = indNew.CreateField(fld.Name)
indNew.Fields.Append fldNew
Next
indNew.Primary = ind.Primary
indNew.Unique = ind.Unique
indNew.IgnoreNulls = ind.IgnoreNulls
tdNew.Indexes.Append indNew
tdNew.Indexes.Refresh
Next
End If
Next

'Recreate the queries

For Each qd In dbCorrupt.QueryDefs
If Left(qd.Name, 4) <> "~sq_" Then
Set qdNew = dbCurrent.CreateQueryDef(qd.Name, qd.sql)
End If
Next
dbCorrupt.Close
Application.RefreshDatabaseWindow

MsgBox "Procedure Complete."
End Sub

_____________________________________


Hi Luke,

With Access closed, use Windows Explorer to navigate to the folder where this database is saved
to. With View > Details, do you see a small 1 KB locking database file? If you have Windows
Explorer set to shown known file extensions, this will have a .ldb extension. If you see such a
file, and Access is not running, then try to delete it. If your database is split into a
front-end / back-end, and these are stored in different folders, then make sure to check each
folder.

Tom
______________________________________


Hi,

I have a Access2002 mdb file that I cannot open and I am 100% sure no one else has it open.
There is some corruption present.

It gives the error:

3197 - The Microsoft Jet database engine stopped the process because you and
another user are attempting to change the same data at the same time.

So, I used JETCOMP.exe (ver 4.0) but that fails saying it cannot compact it.
Is this file dead or can I recover it?

Thankyou
 
T

Tom Wickerath

Passwords in system tables are not stored in OLE fields....the error number you reported
indicates a corrupt OLE field.

Have you tried the code provided by Frank Miller, which I reposted below? If your database
includes a password (ie. Tools > Database Utilities > Set database password...), then modify the
following line of code in Frank Miller's sample:

From
Set dbCorrupt = OpenDatabase(strDBPath)

To
Set dbCorrupt = OpenDatabase(strDBPath, False, False, ";PWD=xxxx")

where xxxx is the actual database password.


Tom
_____________________________________


No Tom that doesn't work. But it would be that the database has a password
set and so that must read from a system table.
Thanks for your responses.

---------------
Luke Bellamy
Newcastle, Australia
_____________________________________


Can you open your database if you hold down the shift key while attempting to open it. This
should allow you to bypass any startup forms or autoexec macros. The KB article below suggests
that you can get this error when a read is attempted with an OLE or MEMO data-type. Holding down
the shift key might allow you into the database, since no table reads should occur.

***************************************
From KB 182867 for Jet 3.5 databases: http://support.microsoft.com/?id=182867
(Likely applies to Jet 4.0 databases as well).
Error Number 3197:
Error message:

The Microsoft Jet database engine stopped the process because you and another user are attempting
to change the same data at the same time.
Cause/Problem:

This error typically occurs when a long value column (an OLE or MEMO data-type) has bad data
stored in it. Long value columns are typically stored in a separate page from the page that the
row is stored in. If a long value column is present in the table schema, the Jet database engine
will attempt to read the long value page when reading the row of data. In order to read the long
value page, there is a pointer in the row of data. This error is generated when the Jet database
engine cannot properly read the long value page from the pointer present in the data row. When
viewing a row that exhibits this behavior in Microsoft Access data-windows, the user will
typically see the number sign (#) for the entire row.

***************************************
If you can open your database with the shift key depressed, you might try this KB article:
http://support.microsoft.com/?id=815280

Another alternative that may allow you to recover the tables and queries, is to create a new
Access database. Make sure to set a reference to the Microsoft DAO 3.x Object Library, where 3.x
= 3.51 for Access 97 and 3.6 for Access 2000, 2002 or 2003. Then copy and paste the code shown
below into your new database.

Option Compare Database
Option Explicit

' This code requires a reference be set to the Microsoft DAO 3.x Object Library

Sub RecoverCorruptDB()

' Posted by Frank Miller, Microsoft Support Group, as a method of recovering tables & queries
'
http://groups.google.com/[email protected]

' This code should import all tables and queries from the damaged database
' into the current database. Note that this solution does not take secured
' databases into effect, so additional code to create workspaces, etc may be
' needed if the database has been secured.

Dim dbCorrupt As DAO.Database
Dim dbCurrent As DAO.Database
Dim td As DAO.TableDef
Dim tdNew As DAO.TableDef
Dim fld As DAO.Field
Dim fldNew As DAO.Field
Dim ind As DAO.Index
Dim indNew As DAO.Index
Dim qd As DAO.QueryDef
Dim qdNew As DAO.QueryDef
Dim strDBPath As String
Dim strQry As String

'Replace the path below to the path of the corrupted database
strDBPath = "C:\My Documents\Appraisals.mdb"

On Error Resume Next
Set dbCurrent = CurrentDb
Set dbCorrupt = OpenDatabase(strDBPath)
For Each td In dbCorrupt.TableDefs
If Left(td.Name, 4) <> "MSys" Then
strQry = "SELECT * INTO [" & td.Name & "] FROM [" & td.Name & "] IN '" &
dbCorrupt.Name & "'"
dbCurrent.Execute strQry, dbFailOnError
dbCurrent.TableDefs.Refresh
Set tdNew = dbCurrent.TableDefs(td.Name)

'Recreate the indexes on the table

For Each ind In td.Indexes
Set indNew = tdNew.CreateIndex(ind.Name)
For Each fld In ind.Fields
Set fldNew = indNew.CreateField(fld.Name)
indNew.Fields.Append fldNew
Next
indNew.Primary = ind.Primary
indNew.Unique = ind.Unique
indNew.IgnoreNulls = ind.IgnoreNulls
tdNew.Indexes.Append indNew
tdNew.Indexes.Refresh
Next
End If
Next

'Recreate the queries

For Each qd In dbCorrupt.QueryDefs
If Left(qd.Name, 4) <> "~sq_" Then
Set qdNew = dbCurrent.CreateQueryDef(qd.Name, qd.sql)
End If
Next
dbCorrupt.Close
Application.RefreshDatabaseWindow

MsgBox "Procedure Complete."
End Sub

_____________________________________


Hi Luke,

With Access closed, use Windows Explorer to navigate to the folder where this database is saved
to. With View > Details, do you see a small 1 KB locking database file? If you have Windows
Explorer set to shown known file extensions, this will have a .ldb extension. If you see such a
file, and Access is not running, then try to delete it. If your database is split into a
front-end / back-end, and these are stored in different folders, then make sure to check each
folder.

Tom
______________________________________


Hi,

I have a Access2002 mdb file that I cannot open and I am 100% sure no one else has it open.
There is some corruption present.

It gives the error:

3197 - The Microsoft Jet database engine stopped the process because you and
another user are attempting to change the same data at the same time.

So, I used JETCOMP.exe (ver 4.0) but that fails saying it cannot compact it.
Is this file dead or can I recover it?

Thankyou
 
L

Luke Bellamy

Yep Tom I have a little tool I wrote myself using VB6 to open a password
protected database
and repair and compact a file. This is for users so they can repair a file
and I keep my password.
JetComp.exe asked for my password which was good but it still didn't like
the file.

I used a demo tool I found on the web (www.officerecovery.com/access) and it
repaired the file fine.
Of course it costs (quiet a bit after conversion to Aussie dollars).
But I can't help thinking that if this tool can do it then certainly
Microsoft would have
an idea of the problem and posted a fix. So I'm researching for a while.

---------------
Luke Bellamy
Newcastle, Australia

Tom Wickerath said:
Passwords in system tables are not stored in OLE fields....the error number you reported
indicates a corrupt OLE field.

Have you tried the code provided by Frank Miller, which I reposted below? If your database
includes a password (ie. Tools > Database Utilities > Set database password...), then modify the
following line of code in Frank Miller's sample:

From
Set dbCorrupt = OpenDatabase(strDBPath)

To
Set dbCorrupt = OpenDatabase(strDBPath, False, False, ";PWD=xxxx")

where xxxx is the actual database password.


Tom
_____________________________________


No Tom that doesn't work. But it would be that the database has a password
set and so that must read from a system table.
Thanks for your responses.

---------------
Luke Bellamy
Newcastle, Australia
_____________________________________


Can you open your database if you hold down the shift key while attempting to open it. This
should allow you to bypass any startup forms or autoexec macros. The KB article below suggests
that you can get this error when a read is attempted with an OLE or MEMO data-type. Holding down
the shift key might allow you into the database, since no table reads should occur.

***************************************
From KB 182867 for Jet 3.5 databases: http://support.microsoft.com/?id=182867
(Likely applies to Jet 4.0 databases as well).
Error Number 3197:
Error message:

The Microsoft Jet database engine stopped the process because you and another user are attempting
to change the same data at the same time.
Cause/Problem:

This error typically occurs when a long value column (an OLE or MEMO data-type) has bad data
stored in it. Long value columns are typically stored in a separate page from the page that the
row is stored in. If a long value column is present in the table schema, the Jet database engine
will attempt to read the long value page when reading the row of data. In order to read the long
value page, there is a pointer in the row of data. This error is generated when the Jet database
engine cannot properly read the long value page from the pointer present in the data row. When
viewing a row that exhibits this behavior in Microsoft Access data-windows, the user will
typically see the number sign (#) for the entire row.

***************************************
If you can open your database with the shift key depressed, you might try this KB article:
http://support.microsoft.com/?id=815280

Another alternative that may allow you to recover the tables and queries, is to create a new
Access database. Make sure to set a reference to the Microsoft DAO 3.x Object Library, where 3.x
= 3.51 for Access 97 and 3.6 for Access 2000, 2002 or 2003. Then copy and paste the code shown
below into your new database.

Option Compare Database
Option Explicit

' This code requires a reference be set to the Microsoft DAO 3.x Object Library

Sub RecoverCorruptDB()

' Posted by Frank Miller, Microsoft Support Group, as a method of recovering tables & queries
'
http://groups.google.com/[email protected]

' This code should import all tables and queries from the damaged database
' into the current database. Note that this solution does not take secured
' databases into effect, so additional code to create workspaces, etc may be
' needed if the database has been secured.

Dim dbCorrupt As DAO.Database
Dim dbCurrent As DAO.Database
Dim td As DAO.TableDef
Dim tdNew As DAO.TableDef
Dim fld As DAO.Field
Dim fldNew As DAO.Field
Dim ind As DAO.Index
Dim indNew As DAO.Index
Dim qd As DAO.QueryDef
Dim qdNew As DAO.QueryDef
Dim strDBPath As String
Dim strQry As String

'Replace the path below to the path of the corrupted database
strDBPath = "C:\My Documents\Appraisals.mdb"

On Error Resume Next
Set dbCurrent = CurrentDb
Set dbCorrupt = OpenDatabase(strDBPath)
For Each td In dbCorrupt.TableDefs
If Left(td.Name, 4) <> "MSys" Then
strQry = "SELECT * INTO [" & td.Name & "] FROM [" & td.Name & "] IN '" &
dbCorrupt.Name & "'"
dbCurrent.Execute strQry, dbFailOnError
dbCurrent.TableDefs.Refresh
Set tdNew = dbCurrent.TableDefs(td.Name)

'Recreate the indexes on the table

For Each ind In td.Indexes
Set indNew = tdNew.CreateIndex(ind.Name)
For Each fld In ind.Fields
Set fldNew = indNew.CreateField(fld.Name)
indNew.Fields.Append fldNew
Next
indNew.Primary = ind.Primary
indNew.Unique = ind.Unique
indNew.IgnoreNulls = ind.IgnoreNulls
tdNew.Indexes.Append indNew
tdNew.Indexes.Refresh
Next
End If
Next

'Recreate the queries

For Each qd In dbCorrupt.QueryDefs
If Left(qd.Name, 4) <> "~sq_" Then
Set qdNew = dbCurrent.CreateQueryDef(qd.Name, qd.sql)
End If
Next
dbCorrupt.Close
Application.RefreshDatabaseWindow

MsgBox "Procedure Complete."
End Sub

_____________________________________


Hi Luke,

With Access closed, use Windows Explorer to navigate to the folder where this database is saved
to. With View > Details, do you see a small 1 KB locking database file? If you have Windows
Explorer set to shown known file extensions, this will have a .ldb extension. If you see such a
file, and Access is not running, then try to delete it. If your database is split into a
front-end / back-end, and these are stored in different folders, then make sure to check each
folder.

Tom
______________________________________


Hi,

I have a Access2002 mdb file that I cannot open and I am 100% sure no one else has it open.
There is some corruption present.

It gives the error:

3197 - The Microsoft Jet database engine stopped the process because you and
another user are attempting to change the same data at the same time.

So, I used JETCOMP.exe (ver 4.0) but that fails saying it cannot compact it.
Is this file dead or can I recover it?

Thankyou
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top