|
-
Dec 31st, 2016, 12:29 PM
#16
Re: Input values into a DataGridView in a form and have them update to my Database.
You're still misusing the Using statement. That's about disposing of an object once you are done with it, but you are using it here:
Using bloodsugartable
That gives you no advantage, and I'm kind of thinking that it does nothing at all. Normally, you would create the object in the Using statement, and it would be destroyed in the End Using. In this case, you don't create it in the Using statement, and if it really were being disposed in the End Using....that would be BAD, because you want it to stick around as the datasource of the DGV.
So, get rid of the Using statement. It isn't doing anything useful, and may be doing something you don't want.
My usual boring signature: Nothing
 
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|