473,386 Members | 1,702 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,386 software developers and data experts.

locked table records on sql 2005 using access97 query

on sql 2005, I've got a view with select permission granted, the view
just "select * from table"
using odbc in access97, I linked this view and I create a query to
retrieve certain fields
the query properties are 'no locks' and dynaset record type

but just executing the query as a datasheet, locks some records in the
original sql server table
is this how it should work ? seems to me that it should not lock
anything

what if I use a snapshot record type, would that not lock records ?
Jun 27 '08 #1
4 2741
On May 9, 8:05*am, Roger <lesperan...@natpro.comwrote:
on sql 2005, I've got a view with select permission granted, the view
just "select * from table"
using odbc in access97, I linked this view and I create a query to
retrieve certain fields
the query properties are 'no locks' and dynaset record type

but just executing the query as a datasheet, locks some records in the
original sql server table
is this how it should work ? seems to me that it should not lock
anything

what if I use a snapshot record type, would that not lock records ?
I moved the query to sql server, granted select permission, and now
I'm using this view as a linked table, same problem

if I just open the table (view) in access, and use the sql activity
monitor, it shows many page locks, and I not sure why since I'm not
scrolling through the records
Jun 27 '08 #2
Hi Roger,

The problem you are having is with the ODBC connection. ODBC
connections are continuous, thus, you will have record locking issues,
contention issues, and all sorts of other issues because of this
continuous connection. The fix is to not have a continous connection.
This is achieved by pulling the data you want to read into the local mdb
into a local table. You could use an append query to append (Insert
Into) records from the view to your local table, but a more reliable
method would be to use ADO.

ODBC is old technology and it was pretty state of the art when
everything was small. But, as data processing operations have evolved,
the demands are exceeding what ODBC (and Access altogehter) was
originally designed for. The current-permanent fix for all this (in the
Microsoft environment) is to migrate to disconnected data processing of
.Net (for data processing operations that involve servers - especially
the newer ones like sql server 2005 and higher).

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Jun 27 '08 #3
Roger wrote:
on sql 2005, I've got a view with select permission granted, the view
just "select * from table"
using odbc in access97, I linked this view and I create a query to
retrieve certain fields
the query properties are 'no locks' and dynaset record type

but just executing the query as a datasheet, locks some records in the
original sql server table
is this how it should work ? seems to me that it should not lock
anything

what if I use a snapshot record type, would that not lock records ?
Just don't open the link as a datasheet. Most other uses (forms, reports,
etc.) will not have this problem.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Jun 27 '08 #4
On May 13, 5:46*pm, "Rick Brandt" <rickbran...@hotmail.comwrote:
Roger wrote:
on sql 2005, I've got a view with select permission granted, the view
just "select * from table"
using odbc in access97, I linked this view and I create a query to
retrieve certain fields
the query properties are 'no locks' and dynaset record type
but just executing the query as a datasheet, locks some records in the
original sql server table
is this how it should work ? seems to me that it should not lock
anything
what if I use a snapshot record type, would that not lock records ?

Just don't open the link as a datasheet. *Most other uses (forms, reports,
etc.) will not have this problem.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt * at * Hunter * dot * com
turns out the form has the problem too
but I found the fix in creating the sql view
instead of the view being
select * from table

I'm using
select * from table (nolock)

seems to work so far using either datasheet or a form
Jun 27 '08 #5

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

Similar topics

1
by: Dudley Joseph | last post by:
Hi Ive got an Access97 db with a record in one of the tables that appears to be locked by another user even though no one is using it and the ..ldb confirms this. I need to delete this record...
0
by: jimmojelsky | last post by:
Access97 database - it is set up to share between several computers - some users have full access, others only have read access - locking is set at "no lock" - everything works unless one of the...
3
by: DD | last post by:
I have a mainform with a subform. > The main form has a dropdown box "chooseMonth", in the afterupdate event > i requery the subform so all records with the same date are viewed. > Now i only want...
1
by: Randy | last post by:
Access= 2002 I'm NOT a Programmer, but I have used VB in the past to do some things ( Spaghetti Code King) so I have some understanding of Coding I need to replace a text field (teacher) in...
2
by: Alicia | last post by:
Does anyone know why I am getting a "Syntax error in Create Table statement". I am using Microsoft Access SQL View to enter it. Any other problems I may run into? CREATE TABLE weeks (...
2
by: Terry | last post by:
I have a database that I would like to query for a specific date range. I want to create a report based on this query that will pull any records from the last 7 days. Is this possible? Can...
7
by: Bruce Lawrence | last post by:
I have a table on a SQL server called history. When I link this table using an ODBC connection, i give it the username and password and tell it to save the password and it works great. On my PC. ...
1
by: University of Toronto | last post by:
Hi gang, Hopefully someone can help us out. In short - Access 2002, db split into a front end and back end. It appears that our backend db is locked. Our form bound to one table won't allow...
11
by: fniles | last post by:
One of our application uses VB6 and Access97 database. Another application uses VB.NET 2005. This morning for about 15 seconds when the application tries to read either a query or a table from the...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.