try
{
// create a new ADOConnection to the text file through ODBC and an existing Data Source
ADOConnection conn = new ADOConnection("Provider=MSDASQL;DSN=registrations;");
// create a DataSet Command that selects all the records from the registration.txt table (which in this case is a file)
ADODataSetCommand AdoCmd = new ADODataSetCommand("SELECT * FROM registrations.txt", conn);
// fill the dataset with the registration.txt table
AdoCmd.FillDataSet(dataSet1, "registrations.txt");
DataTable ContactTable =...[ 查看全文 ]