C
chirag
Basically, I have the following code which fills up a DbDataAdapter
(which is of DataAdatper type). Is there a quick way to map the
columns and transfer the data in this adapter to a new TableAdapter ?
This new TableAdapter will be linked to a SQL database.
Thanks!
Chirag
DbProviderFactory factory =
DbProviderFactories.GetFactory("System.Data.OleDb");
DbDataAdapter dbDataAdapter = factory.CreateDataAdapter();
DbCommand selectCommand = factory.CreateCommand();
selectCommand.CommandText = excelCommand;
DbConnection connection = factory.CreateConnection();
connection.ConnectionString = excelConnectionString;
selectCommand.Connection = connection;
dbDataAdapter.SelectCommand = selectCommand;
DataSet aEESamples = new DataSet();
dbDataAdapter.Fill(aEESamples);
(which is of DataAdatper type). Is there a quick way to map the
columns and transfer the data in this adapter to a new TableAdapter ?
This new TableAdapter will be linked to a SQL database.
Thanks!
Chirag
DbProviderFactory factory =
DbProviderFactories.GetFactory("System.Data.OleDb");
DbDataAdapter dbDataAdapter = factory.CreateDataAdapter();
DbCommand selectCommand = factory.CreateCommand();
selectCommand.CommandText = excelCommand;
DbConnection connection = factory.CreateConnection();
connection.ConnectionString = excelConnectionString;
selectCommand.Connection = connection;
dbDataAdapter.SelectCommand = selectCommand;
DataSet aEESamples = new DataSet();
dbDataAdapter.Fill(aEESamples);