CodePudding user response:
The DataTable dt=datagridview1. The DataSource as DataTableList
CodePudding user response:
If you will be inside the DataTable comparison or in SQL is actually there is no problem, you can put the database source into a DataTable his judgmentWrite as DataTable support available inside the select query, so don't want to cycle can also write a query
CodePudding user response:
In the id column in the database is set to the primary key,Without judgment, directly inserted into, plus the try catch, if repeated will enter the catch