Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7817657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T06:18:17+00:00 2026-06-02T06:18:17+00:00

Using IQToolkit with MySQL, I would like to perform a LOCKING READ within a

  • 0

Using IQToolkit with MySQL, I would like to perform a LOCKING READ within a transaction and according to the mysql docs, the way to do that is by using “SELECT… FOR UPDATE”.
However it seems that LINQ does not support this by default and I found this thread talking about achieving similar goal by handling the ChangeConflictException. what is the best way to do the same using IQToolkit LINQ provider with MySQL?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T06:18:18+00:00Added an answer on June 2, 2026 at 6:18 am

    IQToolkit doesn’t have a facility to request row locking. However, if you are using a transaction you ought to get read locks for reads happening within the transaction, depending on the level of isolation of the transaction.

    LINQ to SQL has specific support for optimistic concurrency, meaning the expected use of the API’s is that you don’t read the data within a transaction, but when you submit changes, all those go within a transaction (which happends under the covers on your behalf.) The optimistic part occurs when the updates are sent. If the rows have changed since when you read the data, the updates for those rows will fail. This leaves you with the choice of either aborting the whole thing, automatically starting over with new reads, etc, or using the information in the change conflict exception to pick and chose which how to merge your changes with the databases changes and then resubmit them. The pick and chose approach is complicated and unless you ‘know what you are doing’, you should probably just use the ‘retry the whole thing from scratch’ approach.

    IQToolkit does not have the facility to enable you to use the ‘pick and choose and resubmit’ approach. So you are best served, if attempting optimistic concurrency, to simply retry the whole thing if an update fails. If you would rather use pessimistic concurrency and simply putting the read queries under the transaction does not give you the lock you want, then you are free to add that capability to IQToolkit as it is fundementally a source kit and examples for building IQueryable query providers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using a restful resource in Rails, I would like to be able to insert
Using Flex 3, I would like to take an image snapshot such as this:
Using Rails 3.2.0 with haml and sass: I Would like to link an external
Using JQuery, how do I select all elements with class x within an element
Using Nunit, I want to be able to write a test fixture that will
Using PHP, I can convert MySQL data or static table data to csv, Excel,
Using top it's easy to identify processes that are hogging memory and cpu, but
Using php/html, I want to retrieve email addresses (plus other information) from MySQL and
using xmltextreader, how would I load a hashtable. XML: <base><user name=john>2342343</user><user name=mark>239099393</user></base> This was
using grep, vim's grep, or another unix shell command, I'd like to find the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.