|
-
Jan 23rd, 2013, 10:59 AM
#8
Re: help on altering tables on vb.net
Ah, good. That's a raw SQL approach, which is a good way to go about it.
There are a couple possibilities. The first is that, since you can't "point a DGV at a database", you aren't really updating anything at all. This is pretty likely. A DGV (usually) has a datasource, which is generally a datatable, dataview, or some other closely related animal. The datatable or dataview is populated from the database, often using a dataadapter or tableadapter. The actual data isn't in the database, though, but rather it is brought into whatever datasource the DGV is using. When you edit a record, you may well be editing this source, but you are probably not pushing those changes back to the database, so they aren't really recorded for very long. The solution is to update the datasource back to the database, but once again, the means to do that depends on what the datasource is and how you are obtaining it. Technically, you could use raw SQL to perform the update in a fashion similar to the INSERT button, but that is almost certainly going about it the hardest possible way.
My usual boring signature: Nothing
 
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
|