I'm using the IDbDataAdapter Interface to fill my dataSet from a SQLite database. Unfortunatelly the Fill function sets the the DataTable names "Table, Table1. Table2, etc.". I have multiple databases and tables the best way is to fillt the DataTalename automatic with the Fill function. Without thes correct tablenames the .Update function isn't working as well.
- In the most manuals there using Fill(table, "tableName") but the only function in the IDbAdapter is the Fill(table) function.
- I set the MissingSchemaAction to AddWithKey and the MissingMappingAction to Passthrough
Both doesn't change the table names in the created DataSet.
Is it possible to set the database table names automatic using the .Fill function?
Thanks for helping.
I found a way do solve my problem. Ralf got me the perfect hints.
In my case I define the DataTableName depending on the given sql string. After that I can use the TableMappings from the DataAdpater to map the name to the used Table. In this case I can use the interface to guarantee dependency injection.
And second I forgot to create the specific CommandBuilder object.
Problem soveld :)