Hi all,
I created a new "Component Class" in a project (Add new... & choose
"Component Class"). When you get into Design Mode you see the message: "To
add components to your class, drag them from the Server Explorer...". If you
drag a table from a data source in the Server Explorer, the designer
generates a DataAdapter for the table, complete with the command objects
filled with the correct SQL code.
I need to know if there is a way to generate the exact same Data Adapter
programmatically at runtime using a custom database connection and a table
name.
Something like:
Dim x as new System.ComponentModel.Component
Dim a as SQLDataAdapter = x.GenerateAdapter(c as SQLConnection, tableName as
string)
....even thought this code is invalid.
I need to dynamically generate a DataAdapter on the fly, complete with its
command objects, for a given database table known at run-time only. I
thought of using the designer objects instead of dynamically generating the
code myself.
It would really save me some time would that be possible.
Thanks,
C