D
Dan Reber
The below code is what I put together to open a XML persisted ADODB 2.8
recordset in an ADO.Net v2 DataSet. My question is if the below code the
best why to go about this.
Thanks
Dan Reber
ADODB.Recordset rs = new ADODB.Recordset();
rs.Open(fileName, Type.Missing, CursorTypeEnum.adOpenStatic,
LockTypeEnum.adLockBatchOptimistic, -1);
try
{
DataSet myDataSet = new DataSet();
OleDbDataAdapter adapter = new OleDbDataAdapter();
adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey;
int count = adapter.Fill(myDataSet, rs, "ADODB.RecordSet");
return myDataSet;
}
catch (Exception e)
{
Console.Write(e.ToString());
return null;
}
recordset in an ADO.Net v2 DataSet. My question is if the below code the
best why to go about this.
Thanks
Dan Reber
ADODB.Recordset rs = new ADODB.Recordset();
rs.Open(fileName, Type.Missing, CursorTypeEnum.adOpenStatic,
LockTypeEnum.adLockBatchOptimistic, -1);
try
{
DataSet myDataSet = new DataSet();
OleDbDataAdapter adapter = new OleDbDataAdapter();
adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey;
int count = adapter.Fill(myDataSet, rs, "ADODB.RecordSet");
return myDataSet;
}
catch (Exception e)
{
Console.Write(e.ToString());
return null;
}