You're going to have to write some code that queries the DB and checks for the value. We are about to release our new Database Accelerator Suite (Basic version is FREE) which you could use to do this *WITHOUT HAVING TO WRITE CODE*. The suite will go live in 3-4 weeks. In the meantime, please send me e-mail if you'd like to install a beta version.
If you would rather not install our cool new Database Accelerator Suite, you will have to write some custom code to query SQL for the value. Around this code, you'll want to lock the DB. It's probably 20-30 lines of code, but more significantly, it will require full trust and hardcoding of the connection string in the solution. I recommend against doing those things because they make the form a) harder to deploy and b) more costly to maintain. Nevertheless, we have done it before and you *can* do it. If you need a code snippet, we'd be happy to spend a couple hours helping you write it. You can purchase a block of time in the store.
Cheers!
Patrick Halstead
Project Manager at Qdabra