Updating the database directly is a very bad idea. The BO provides an interface for us that ensures we don't have to have a proper understanding of the database schema - as in the part of the db that ensures data integrity. This is a bad idea dude. I'm personally not a fan of thinking my code is fine when working with other systems because different approaches can be made to accomplish the same goal. If what I'm working on can't be looked at by my friends I replicate the environment I'm interfacing with to debug the bottleneck...let's look at some of your code to see if maybe someone here can find potential issues that can be resolved. I'm particularly interested in the bug(s) you found.
I don't use the script editor too often but I can promise you, this isn't an Epicor no-no...it's a no no. At the code level, you don't know how the script editor's compiled or integrated with the form so you risk creating a ton of objects just to access a db - never mind the fact you're bypassing all sorts of functionality built into the system. Why write an application with event handling if you're just going to bypass event handling?
What functionality are you trying to accomplish based on user input?