Updating database from datagrid
Using bind variables makes the statement reusable with different input values.
Using bind variables also improves query performance in the database, eliminates the need for special handling of literal quotation marks in the input, and protects against SQL injection attacks.
This can be cumbersome if you have multiple records.
To update multiple records, it's easier to use a SQL statement.
1.firstly , Data Grid control and Adodc are not available on toolbox.
You can search the records by entering Name or Roll No in the record is not available,it shows message"No Record Found". If you like my video, Please Hit like button and Subscribe to my channel for latest updates on tutorials. Record Source = "Select * from Student_Info where Category='OBC'" adogrid. Record Source = "Select * from Student_Info where Class='Plus One'" adogrid. Record Source = "Select * from Student_Info where Class='Plus Two'" adogrid. Record Source = "Select * from Student_Info where Category='SC'" adogrid. Record Source = "Select * from Student_Info where Category='ST'" adogrid. Record Source = "Select * from Student_Info" adogrid.
For the ease of demo I have not taken all the columns of the table for the Details view.Return to the SQL Worksheet and enter the command: Insert into departments (DEPARTMENT_ID, DEPARTMENT_NAME) Values (300, 'Research'); Click F9.NOTE: If you click F5, the detail is shown to the Script Output tab. As before you'll need to commit the changes to save them to the database. As in the above example, you can update data using the SQL Worksheet, using SQL commands, or you can use the data tab in the table definition and update individual rows. Once again you can update rows easily by using the Data tab interface.The following code shows a typical contains a client copy of the database data.In this section, you will add a button that enables client data changes to be saved back to the database.