Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.



Go to last post Go to first unread
judy at Web2Market  
#1 Posted : Monday, October 3, 2022 4:29:10 PM(UTC)
judy at Web2Market

Rank: Advanced Member

Groups: Developers
Joined: 11/7/2018(UTC)
Posts: 291

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
When you load a batch of orders, does this lock parts of tables in the database? If so, is there a way to do this without the locking if these orders are going to be viewed only, no other action?
I know if a sql query you can use with (nolock), but these are loaded using OrderDataSource.

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

#2 Posted : Tuesday, October 4, 2022 1:30:08 PM(UTC)

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 830

Thanks: 3 times
Was thanked: 13 time(s) in 13 post(s)
I'm surprised that support has yet to weigh in on this question, and I hope they do. In my 15 years of using MS SQL, using the standard functions without any type of implicit lock, there should be no locking at all, especially when using a select statement.

Pretty much all SQL databases work on the principle of stateless protocol, same principle as the Internet, they will retrieve whatever subsection of data you need to your local computer and then disconnect from the database, in other words, no hooks into the table.

This is one of the reasons you can pull the plug on the local computer you're using, and the SQL database is not damaged in any way, because it no longer has his hooks into the database structure.

It will deliver the goods and then back off, the same cannot be said to other alternatives like dbase, paradox, or even access, where all the rows are transferred to the local computer. They will always maintain a hook/ connection to the database, this is why if your local computer disconnects (pull the plug) the indexes get all messed up at the server.

Yikes, I remember those days very well.

Unless you're specifically using locking commands, SQL will take care of the rest and will only lock tables when a transaction occurs, and at that point it's an all or nothing event otherwise your data can be overwritten by someone else.

I have written many front end applications in Pascal, where two users are on the same record and one will do a save and a notice will pop up on the other user screen advising them that specific fields have been updated and to refresh their screen. This of course will only occur if it's the same row and the same specific columns in that row. Anything else, the users is unaware of what's going on.

Again, in a nutshell there should be no record locking (actually I believe it's page lock) whatsoever, if you've are using standard protocols, but love for support to weigh in.

I hope some of this helps,

#3 Posted : Thursday, October 6, 2022 4:09:34 AM(UTC)

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 704

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
When you load a batch of orders, does this lock parts of tables in the database?

I am not certain about what you actually meant by locking. If this is related to IsolationLevel on transactions I am sharing the details with you below.

This link has some standard IsolationLevel fields details

There are only a few places where we explicitly apply the IsolationLevel as Serializable: "A range lock is placed on the DataSet, preventing other users from updating or inserting rows into the dataset until the transaction is complete."

- ExecuteCheckout
- Updating Inventory. DeStock/Restock
- SetNextOrderNumber

There is no such explicit code for loading order data.

Also, you mentioned about OrderDataSource. Are you referring to Gold because, in AC9, we use repositories instead of OrderDataSource.
judy at Web2Market  
#4 Posted : Thursday, October 6, 2022 6:11:28 AM(UTC)
judy at Web2Market

Rank: Advanced Member

Groups: Developers
Joined: 11/7/2018(UTC)
Posts: 291

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
Yes, this is a Gold site. They have issues every few days with inserting shipments in the checkout service. This is the only site where I consistently see this error.Sometimes it is about the same time there is an error viewing a custom order management page in the admin that displays about 78-80 orders. They also have routines that import/export data for CounterPoint. One of the routines was running every minute so I changed it to every five minutes. The code that updates orders doesn't use transactions, it just uses order.Save().
Katie S  
#5 Posted : Thursday, October 6, 2022 12:53:25 PM(UTC)
Katie S

Rank: Advanced Member

Groups: System, Administrators, Developers, Registered, HelpDesk
Joined: 10/29/2018(UTC)
Posts: 442

Thanks: 4 times
Was thanked: 34 time(s) in 33 post(s)

Just a reminder that we have different forum section for Gold and older versions here:


Thanks for your support!

Secure eCommerce Software and Hosting
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.