There is a dbf-table. I upload it to DataTable
using SqlBulkCopy
. Is it possible to use this dynamic table in a SQL query to update the SQL table? Thank.
2 answers
I think you should dig in the direction of the class SqlDataAdapter .
This class contains a great int Update method (DataTable dataTable), which allows you to update a data source using a DataTable. Quote: "Updates the values in the database, executing the appropriate INSERT, UPDATE or DELETE statements for each inserted, updated or deleted row in the specified DataTable."
PS I hope I understood the question correctly. :R
I did not find the information whether it is possible to use a dynamic table in the sql query. Out of position, creating a temporary table with the same structure as the dbf-table. This table has unloaded data from the dynamic table, then the usual Update.