DTS (import/export)

  • Thread starter Thread starter Jonathan Woods
  • Start date Start date
J

Jonathan Woods

Hi there,

how do u handle export/import data between your App and other data
sources(e.g. excel spreedsheet). use DTS package? How do u do that?
 
Example of importing data from excel (Excel 11.0 is Excel 2003):

DataSet tmpDS;
OleDbDataAdapter tmpAdapter;
OleDbConnection tmpCon;

tmpCon = new System.Data.OleDb.OleDbConnection(
"provider=Microsoft.Jet.OLEDB.4.0;" +
"data source=" + XLSFileName + "; " +
"Extended Properties=Excel 11.0;");

tmpAdapter = new OleDbDataAdapter("select * from [sheet$1]", tmpCon);
tmpAdapter.Fill(tmpDS);

tmpCon.Close();
 
Back
Top