Hi there,
You can simply call Close() on the DataReader
before you call ExecuteNonQuery. E.g.:
ObjDR.Close()
Dim ObjCmd1 As New SqlCommand(strSQL, ObjConn)
ObjCmd1.ExecuteNonQuery()
ObjConn.Close()
Tip: if you post code here, can you please remove "dead code". You have commented out quite a bit of code. This is easy to spot in an IDE with color coding, but more difficult to read on a forum like this. Removing irrelevant code makes it easier for us to focus on the problem.
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of
ASP.NET 2.0 Instant Results and
Beginning Dreamweaver MX / MX 2004