Note that some OLE DB providers, including the MSData Shape provider, do not return base table or primary key information.Therefore, the and Ole Db Connection, to select records from an Access data source, and populate a Data Set with the selected rows. To accomplish this, the method is passed an initialized Data Set, a connection string, and a query string that is an SQL SELECT statement.In this article we will look at how to update or delete a record in a database table using a Grid View control.
Note: Instead of using Text Box in normal mode use Labels.
Delete a Record We can delete a record from the database table by clicking on the delete button that is in the Delete column of the Grid View.
We first of all create a Stored Procedure that gets the Id of an employee as a parameter from the Grid View on whichever row the user clicked. In this event, first we get the datakey value that is the id of an employee of whichever row the user clicked and that id is passed as a parameter to the Stored Procedure. According to the above, in these three operations we use three events of the Grid View for each operation.
Click Dim total As String = 0 For i As Integer = 0 To Data Grid View1.
Text = total End Sub Background Worker in Visual Basic . NETDisplaying Data in a Chart / Graph - Visual Basic . NETVisual Basic Tutorials Allow Numbers only in a Text Box - Visual Basic .