Deleting a row in DataGrid from database (help!)

bizjosh

Member
Joined
Mar 16, 2005
Messages
23
Programming Experience
Beginner
I'm using a Oledatadapter to fill a dataset and displaying
my ms access records via a datagrid. Anybody is familiar on how to

1. Allow a user to select a Datagrid row and click on a button
"btnDelete" the row will be deleted from the database?
Each row has a unique column called 'ID'. any help?

2. How to write codes to delete all the records that has
integer value of "1" in its Column: fld_Type

Codes:

dataview = dataset.Tables("Table").DefaultView
datagrid.datasource = dataview
 
Hi,
Why you don't try this 14 days evaluation application that generate SQL Statements for you ... very easy for use ;)

So, use it while this make you more comfordable to make SQL Statements by yourself ... later you could uninstall it from your PC ;)
http://www.gold-software.com/EazySQL-review20410.htm

Cheers ;)
 
Last edited:
You can also use MS Access and Visual Studio (the query builder) to generate the SQL statements. Visual studio also has a Data Form Wizard that will generate a form, dataset schema, and code for you based on a series of questions. You can then look at the code/SQL statements and learn.
 
Back
Top