By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,139 Members | 1,228 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,139 IT Pros & Developers. It's quick & easy.

How to prevent Error 3052 ?

P: n/a
Hi alls,

I have some code like the following and get errors 3052 while execution :(
Is there any way around it? How can I prevent the locking for all records in
the set? I think I only need the one locked that is edited ??

While Not rst.EOF
With rst

lon = !lon
lat = !lat
actTime = !ptime

dist = fDistSquare(lat, lon, lastLat, lastLon)

.Edit
!distance = dist
.Update

.MoveNext

lastLon = lon
lastLat = lat
lastTime = actTime

End With
Wend
Any ideas??

Thanks Stefan

Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Stefan Goerres" <li***@gsysteme.de> wrote in message news:<bk************@ID-8437.news.uni-berlin.de>...
Hi alls,

I have some code like the following and get errors 3052 while execution :(
Is there any way around it? How can I prevent the locking for all records in
the set? I think I only need the one locked that is edited ??

While Not rst.EOF
With rst

lon = !lon
lat = !lat
actTime = !ptime

dist = fDistSquare(lat, lon, lastLat, lastLon)

.Edit
!distance = dist
.Update

.MoveNext

lastLon = lon
lastLat = lat
lastTime = actTime

End With
Wend
Any ideas??

Thanks Stefan

What's the SQL that populates the recordset?
Nov 12 '05 #2

P: n/a
Edward wrote:
"Stefan Goerres" <li***@gsysteme.de> wrote in message
news:<bk************@ID-8437.news.uni-berlin.de>...
Hi alls,

I have some code like the following and get errors 3052 while
execution :(
Is there any way around it? How can I prevent the locking for all
records in
the set? I think I only need the one locked that is edited ??

While Not rst.EOF
With rst

lon = !lon
lat = !lat
actTime = !ptime

dist = fDistSquare(lat, lon, lastLat, lastLon)

.Edit
!distance = dist
.Update

.MoveNext

lastLon = lon
lastLat = lat
lastTime = actTime

End With
Wend
Any ideas??

Thanks Stefan

What's the SQL that populates the recordset?


Dim dbsTrackPoints As DAO.Database
Dim rst As DAO.Recordset
'Dim fld As DAO.Field

Set dbsTrackPoints = CurrentDb
Set rst = dbsTrackPoints.OpenRecordset("SELECT * FROM Trackpoint")

Nov 12 '05 #3

P: n/a
Stefan,
I have some code like the following and get errors 3052 while
execution :(
What's the SQL that populates the recordset?
Set rst = dbsTrackPoints.OpenRecordset("SELECT * FROM Trackpoint")


Does it also happen when you select only those fields you really need?

"SELECT lon, lat, ptime, distance FROM Trackpoint;"

Peter

--
No mails please.
Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.