Databases :: General :: "error 3197" visual basic : jet database engine stopped |
|||
| By: FiatLink |
Date: 08/09/2005 10:37:27 |
Points: 20 | Status: Answered Quality : Excellent |
|
Error 3197: When I try open the database I get this message (the database was working perfectly until yesterday): "The Microsoft jet database engine stopped the process because you and another user are attempting to change the data @ the same time." Problem is: there is no-one else connected at the time and the dbase refuses to open. Help!! How do I fix this?? Have made sure the data is clean and that no records are screwed up. Have run JETCOMP to see if that found anything. Have even exported and imported the data into a new database. All of the forms and sub-forms have the same Properties: Recordset Type: Dynaset (Inconsistent Updates) Record Locks: No Locks The database Options (under Advanced) are set to: Default Open Mode: Shared Default Record Locking: No Locks "Open databases using record-level locking" is checked. |
|||
| By: VGR | Date: 08/09/2005 10:47:49 | Type : Answer |
|
| Hello. This famous Jet Engine error 3197 is discussed in this EEE.org PAQ where you will find all Microsoft-related data, but I gathered some more VB-specific details for you : Quote from this old VB4 help page : There are several possible errors that can occur within your Visual Basic program if you attempt to edit a record that is on a data page that is already locked. The most common errors you'll encounter are Error 3260 and Error 3197. Error 3260 occurs whenever you attempt to edit a record that is stored on a page that is already locked by another user or program. You can handle this error by attempting a read at another time. Error 3197 occurs when your program attempts to read a record that has been updated or deleted since you last refreshed the data set. You can handle this error by reloading the record into the data set (usually by invoking the Edit method again). Refer to Listing 14.38 as an example. Listing 14.38. Handling page lock errors during edits. Public Sub PageLockErrors(LockErr As Integer) ' ' handle errors due to page locks ' Static nTries As Integer Dim nMaxTries As Integer Dim nLoop As Integer Dim nTemp As Integer ' nMaxTries = 3 ' Select Case LockErr Case 3197 ' data changed rsObject.Edit ' re-read changed record Case 3260, 3816 ' currently locked nTries = nTries + 1 ' try again If nTries > nMaxTries Then ' too manytimes? nTemp = MsgBox(Error, vbRetryCancel, "Error " + Str(Err)) If nTemp = vbRetry Then ' user said try again nTries = 1 ' start all over End If End If End Select ' DBEngine.Idle ' free up old locks DoEvents ' let messages catch up ' For nLoop = 1 To 2000 ' 2000 millisecond pause ' empty loop Next nLoop Resume ' End Sub
Regards |
|||
|
Do register to be able to answer |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








