Thanks for any help in advance.
In C# it looks something like this:
OleDbConnection myConn = new OleDbConnection(myConnection); // myConnection
is the connection string
OleDbDataAdapter myDataAdapter = new OleDbDataAdapter();
// now you need to define the appropriate queries for the adapter. You can
do this programmatically, by assigning queries
// the the adapter's command properties, but if you are using VS to add the
adapter to your form in design mode
// there are wizards available to design the queries
myConn.Open();
DataSet myDataSet = new DataSet();
myDataAdapter.Fill(myDataSet);
// now modify the data set. The data set is an in-memory representation of a
relational DB. It's essentially a collection of
// DataTable objects (which ones it contains depends on your SELECT query).
You can access these objects using
// the familiar syntax. For example,
myDataSet.Tables["Customers"].Rows[0]["ID"].Value would give you access
// to the value stored in the ID column in the first row of the table named
Customers. You can use the tables NewRow()
// method to create a DataRow for this table, assign values to the columns
(these come from your CSV file) and add
// the DataRow to your table. Finally:
myDataAdapter.Update(myDataSet, tableName);
// writes your changes for table 'tableName' back to the underlying Access
DB.
myConn.Close();
I hope this helps.
--
Kai Brinkmann [MSFT]
Please do not send e-mail directly to this alias. This alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"JH" <yhco...@yahoo.com> wrote in message
news:%23Lz$Z6CzEH...@TK2MSFTNGP10.phx.gbl...