jmcilhinney,

Thank you very very much. That was the problem. It works fine now after the changing the order of the code you mentioned.

The fix I mentioned in post # 6 also worked. I made no other changes in the code except for what I mentioned.

Thank you again.

Quote Originally Posted by jmcilhinney View Post
I don't know exactly what code you're using now but this is from post #1 and it's obviously a problem:
Code:
        Dim cb As New SqlCommandBuilder(sAdapter)
        sAdapter = New SqlClient.SqlDataAdapter(sSQL, conn)
You can't create a command builder on a data adapter before you've created the data adapter. I can't see how the code change in post #6 would make any difference if you've done everything else properly. I've never had a problem with code like your first snippet in post #6, although I haven't used a command builder for a long time.