Re: Lock Violations in Update Query

Tech-Archive recommends: Speed Up your PC by fixing your registry



Hi,



I would try a Me.Dirty=False or a Me.Undo (save or undo changes) before
running the DoCmd.RunSQL.


Have you a recordset with pending update? Do you have other users (piece
of running code is another user too) that play with the range of records to
be modified?


Hoping it may help,
Vanderghast, Access MVP


"Duffey" <Duffey@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:6903F686-FE69-4D2A-A9A9-47C7BDB7AC3D@xxxxxxxxxxxxxxxx
>I have written an update query that will adjust the rank of items in a list
> as follows:
>
> Private Sub Rank_AfterUpdate()
> Dim CurrentProcessID As Integer
> Dim RankUpdate As String
>
> CurrentProcessID = ProcessID
>
> RankUpdate = "UPDATE tblProcessActions SET Rank = Rank + 1 WHERE ProcessID
> = "
> RankUpdate = RankUpdate & CurrentProcessID & " AND Rank >= " & Rank
> RankUpdate = RankUpdate & " AND Rank < " & Me.Rank.OldValue
>
> DoCmd.RunSQL RankUpdate
> Me.Requery
> End Sub
>
> Whenever I run the query, I get the following message:
>
> Microsoft Access didn't update 0 field(s) due to a type conversion
> failure,
> 0 record(s) due to key violations, 5 record(s) due to lock violations, 0
> record(s) due to validation rule violations.
> Do you want to conyinue running this type of action query anyway?
>
> Selecting yes does not update the records. There are no other users in the
> database. Can you help me explain why I am having this problem?


.



Relevant Pages

  • Re: Lock Violations in Update Query
    ... With some further adjustment, that works. ... >>I have written an update query that will adjust the rank of items in a list ... >> Dim RankUpdate As String ... >> Microsoft Access didn't update 0 fielddue to a type conversion ...
    (microsoft.public.access.queries)
  • Re: Update with Max date
    ... Hash: SHA1 ... But the query is still not working, the type convension error is still there. ... I still got the type conversion error, but I can't see any problem with that. ... expression with the wrong data type (comparing apples to oranges). ...
    (microsoft.public.access.queries)
  • Re: Update with Max date
    ... My query so far is: ... conversion error means the query was trying to put the wrong data type ... all records due to a type conversion failure". ... This WHERE clause is screwy 'cuz needs to be referenced - is ...
    (microsoft.public.access.queries)
  • Re: Update Query problem
    ... UPDATE [Account Balance] ... Microsoft Office Acecss didn't update 1 fielddue to a type conversion ... The update query showed the field to be ... the conversion failure? ...
    (microsoft.public.access.queries)
  • Re: INSERT/SELECT and DataType Mismatch
    ... I have tried to execute the same query within MS-Access and I get the same ... type conversion error.I supply all required parameters, ... I turned the INSERT query into UPDATE query, ...
    (borland.public.delphi.database.ado)