Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HOW TO READ SQL RECORDS EXCLUSIVLY....

Status
Not open for further replies.

vijithamar

Programmer
Feb 14, 2002
29
IN
HI

i am trying to read sql server records exclusive...
but it is not working (sql server 2005 and vb.net)

this is my code

dim cmd As New OleDb.OleDbCommand
cmd.Connection = Conn
cmd.CommandText = "select batch.Stock from Batch WITH (XLOCK) order by BatchId"
dim dataredr As OleDb.OleDbDataReader = cmd.ExecuteReader

i am getting the records but not exclusive.

please help me.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top