Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-07-15 : 08:20:36
|
| Wendy writes "Hi,I use SQL Server 7 for my backend data, and Access 2000 as the front end to access the data in the linked tables.In Access 2000 help file, it says:"Data in a form, report, or query from an Open Database Connectivity (ODBC) database is treated as if the No Locks setting were chosen, regardless of the RecordLocks property setting."So how can I make sure that at least row-level locking is in place when my Access form is accessing a record in the table? Is the default setup with SQL Server 7 already includes row-level locking?Thank you very much.Wendy" |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-07-15 : 08:44:46
|
I think what that really means is that Access will not use it's own locking scheme when using ODBC data sources, THANK GOD!!!! SQL Server allows you to set the lock granularity in the SELECT statement via locking hints:SELECT * FROM myTable WITH (ROWLOCK)See Books Online under "ROWLOCK" for more details on the available locking hints. You may need to change the record source for the form to a SQL statement like the one above, instead of just indicating a linked table name. You can also try using an ODBC pass-through query as your data source. These are documented in the Access help file. I haven't used them in Access 2000, but in 97 the locking mechanism was handled by the data source, not Access. |
 |
|
|
|
|
|