1

I want to achieve this:

UPDATE MyTable SET Field1=Field1 + 1 WHERE Field2 = 1 AND Field1 = 5000

Just to explain why is that im verifying that nobody else touched the record, Field1 is a sequence number.

How to achieve this, im thinking something like. MyDb.MySchema.Table.UpdateByField1AndField2(Field1: 5000, Field2: 1, Field1: 5001). Obviously this does not work.

Lars Stenberg
  • 241
  • 1
  • 11

1 Answers1

1

what about ...

MyDb.MySchema.Table.UpdateAll(Field1: 5001, Condition: MyDb.MySchema.Table.Field1==5000 && MyDb.MySchema.Table.Field2==1)

?

DarkSquirrel42
  • 10,167
  • 3
  • 20
  • 31