How to prevent Error 3052 ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Stefan Goerres

    How to prevent Error 3052 ?

    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



  • Edward

    #2
    Re: How to prevent Error 3052 ?

    "Stefan Goerres" <lists@gsysteme .de> wrote in message news:<bk1fb7$oe haa$1@ID-8437.news.uni-berlin.de>...[color=blue]
    > 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[/color]


    What's the SQL that populates the recordset?

    Comment

    • Stefan Goerres

      #3
      Re: How to prevent Error 3052 ?

      Edward wrote:[color=blue]
      > "Stefan Goerres" <lists@gsysteme .de> wrote in message
      > news:<bk1fb7$oe haa$1@ID-8437.news.uni-berlin.de>...[color=green]
      >> 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[/color]
      >
      >
      > What's the SQL that populates the recordset?[/color]

      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")



      Comment

      • Peter Doering

        #4
        Re: How to prevent Error 3052 ?

        Stefan,
        [color=blue][color=green][color=darkred]
        >>> I have some code like the following and get errors 3052 while
        >>> execution :([/color][/color][/color]
        [color=blue][color=green]
        >> What's the SQL that populates the recordset?[/color][/color]
        [color=blue]
        > Set rst = dbsTrackPoints. OpenRecordset(" SELECT * FROM Trackpoint")[/color]

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

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

        Peter

        --
        No mails please.

        Comment

        Working...