Last post Feb 20, 2018 04:30 AM by Lannie
Feb 16, 2018 10:46 AM|dev_rahul|LINK
I am unable to find a method where I can store data from gridview to database.
My concerns is There are four columns in gridview namely Roll No, Name, Present and Absent. Present and Absent have checkboxes, so I want to store these values in a seperate database with only three columns. As Roll_No, Name, Status so im worried
about how I can get it done. Any type of help would be highly appreciated
Feb 19, 2018 09:55 AM|Cathy Zou|LINK
You could foreach gridview to get Roll_No, Name and Status(Check Present checked or not), If Present is checked, Status value is true.
Otherwise it’s value is false.
Related thread for reference:
Feb 20, 2018 04:30 AM|Lannie|LINK
Depends on database and whether you are using SQL or the database procedural language for doing the insertion.
Oracle SQL does not support Boolean datatypes, but the Oracle PL/SQL (database procedure) does; however the target Oracle data table does not support Boolean datatype.
The desired effect can be accomplished by the SQL statement (with conversion of Boolean to text) or the PL/SQL procedure.
Given that you are transforming two columns into one, and the value being passed is classically Boolean for Checkbox.IsChecked, for Oracle the INSERT would best be done in the Database Procedural side.
How that is done, again depends on the database being called due to differences in each database.
So first determine the datatype capabilities of your target database.