We have a vbscript that creates user accounts based on fields in a SQL 2000 database. I have created a view that gathers the necessary fields and the vbscript SELECT * from this view.

The problem is that when I run the same query, SELECT * FROM viewname, it works fine using query analyzer but when run from the script it holds locks on the tables and blocking occurs.

Should I look to change the vbscript or could I use lock hints in my view to prevent this? Thanks.