I'm guessing that this is a seperate class file from your ASP web form. Try adding Imports System.Web to the top of your DataAccess class file. BTW: Your data layer classes, properly written, shouldn't care about what type of application is using them. Your code is using a web application Lock method where it shouldn't have to. The data layer should never have this kind of dependancy. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome