Paradox Direct Engine (ActiveX edition) v2.95

Paradox Direct Engine (ActiveX edition) v2.95
http://www.scalabium.com/pdx/pdxa.htm

The new SaveToXML method you may generate the xml-file which is compatible with .NET DataSet class.
Now you may do not use the ado recordset and load the xml directly in Dataset().
For example:

// create unbound recordset for temporary storage (from Paradox table)
DataTable table1 = new DataTable("country");
table1.Columns.Add("Name");
table1.Columns.Add("Capital");
table1.Columns.Add("Continent");
table1.Columns.Add("Area");
table1.Columns.Add("Population");
 
DataSet set = new DataSet("map");
set.Tables.Add(table1);
 
// convert the records in Paradox table to xml-file
PdxViewA.TScalabiumParadoxReader pdx = new PdxViewA.TScalabiumParadoxReader();
pdx.FileName = Application.StartupPath + "\\country.db";
pdx.SaveToXML(Application.StartupPath + "\\country.xml", "country", false);
if (pdx.LastErrorMessage != null)
MessageBox.Show(pdx.LastErrorMessage);
 
//load converted xml into dataset
set.ReadXml(Application.StartupPath + "\\country.xml");
 
//view records in datagrid
dataGridView1.DataSource = table1;

Tags: ,

Comments are closed.