The solution suggested is put together manually as there are no server behaviors for it. The idea is that you would check the requested quantity against the available inventory with a recordset. You would then do like you say and show an error message to the user to let them know. This is how it is setup in PowerStore.
In the thread you mentioned the query given by me is just for checking purposes, it will not update the inventory. To update the inventory will require doing a loop through the items in the cart and having an update occur for each one. This part is a little custom and will require some hand coding to get into place properly.
If you are thinking about using PowerStore it will handle all of this for you. Let us know if you want to go the manual route post back with any specific questions that you have.