Rather than using DYNAMIC HTML you should take advantage of stored procedures, just a thought. Dynamic html is vulnerable to SQL Injection, no security mechanism, and the code is a bit more difficult to read. Generally you want all INSERTS / UPDATES / DELETES to be performed on the server side of things.