Posted on 2006-03-30
I have a big string which contains a whole lot of batch queries and I was wondering how to lock the database or even better specific tables then perform the batch queries and then unlock either the tables or the database. I am running on sql server 2006. Basic code is below not exact but just to show how I am currently running the queries.
Dim DatabaseConn As SqlConnection = New SqlConnection("Server=sdf;UID=sdg;PWD=dfb;DATABASE=dfb")
Dim SqlQuery As SqlCommand
SqlQuery = New SqlCommand(QueryString, DatabaseConn)