It sounds like you are developing an Active Server Page.
While VBScript is used for ASP, you might want to post your question in the Tek-Tips ASP.NET forum too.
I've also seen other websites that offer ASP tutorials and sample scripts for dealing with databases such as you describe.
Perhaps...