简体   繁体   中英

Access 2010 and SQL Server 2008 R2 Error 3157 Timeout

I have a big Problem. One of my Access-Apps failed, when a Recordset should save. The Code to save is (button event):

bolsichern = True
DoCmd.RunCommand acCmdSaveRecord

Before I open a Form. I change something and click the Save-Button. For x times the save is successfull, but in the next moment the Debugger starts. I click Debug and come into VBA. This is yellow:

DoCmd.RunCommand acCmdSaveRecord

But when I press F5 the code runs, I mean the save is successfull. What is the matter? On some days, there is no call of an user about this error. Another day the error comes every time, when I want to save. That mean the Debug-Windows opens, I go to VBA an press F5 and it works!!!

How can I find the cause, when the error comes only spradic?

Please help me ;-)

THX.

Vegeta

UPDATE:

In another Forum a user have the same Problem, maybe this disciption is more significant, than mine:

We have a SQL 2008 R2 standard edition installed on Server 2008. We use an access front-end which connects to a SQL backend tables which are linked with the app.
Since last 2 weeks, we are continuously getting application freeze with the error - ODBC Error 3157: Update to linked table "###" failed
So far I have done the below:
1. Added primary key to the table as it had an identity column only
2. Relinked all the table and redistributed the front-end to the users
3. Ensure SQL files are shrunk
4. Checked network connections connecting the server to the switch
5. Checked SQL configuration manager to ensure right accounts are being used for the SQL services
This issue is very sporadic and it is now becoming frustrating as it has been ongoing for couple of weeks.
Can anyone shed some light on this as I am running out of possible ideas.

All of this Points I tried, but it still sporadic don't work :-(

Are other users using the system while you're making the saves? If so, and if you're form contains combo boxes then you may be experiencing the same issue we had whereby the presence of a combo boxes was causing Access to lock the tables referenced in the combo boxes, which then caused errors when another user tried to write or update the table referenced by the combo.

This meant that, for example that if there was a combo to select the stock item on the Sales Line form then opening the sales line form would lock the entire Stock table for all other users, preventing inserts/updates/deletes.

We could consistently do the following to illustrate the issue:

  • Open a sales line on one copy of the system - that sales line has a combo that looks up data from the Stock table
  • Open the stock item in another copy of the system
  • Edit and save that stock item
  • At that point the system showing the stock item hangs
  • Then close the sales line on the first copy
  • That seems to release the lock on the Stock table as the stock item will then immediately save on the second copy

We resolved this by creating a SQL pass through query to the stock table and using that as the record source in the combo, rather than using an Access linked-table onto the Stock table in the SQL database as we had been previously. Doing that stopped the table locking occurring.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM