We provide API which you can use from your own application to convert your data from one format to another.
You have to prepare an array with parameters and pass it to the StartConversion function. The list of parameters.
int StartConversion(string[] parameters);
returns 1 if there were not problems and conversion has started;
returns 0 if something is wrong with parameters. Additional info you can get in conversionDidFail.
void CancelConversion();
It allows you to break the conversion. API closes all opened files and stops.
delegate void ConversionDidFail(int code);
The function is called if there was some problem with input parameters:
delegate void ConversionProgress(int percent);
This function provides information about the convertion progress. You can also cancel the process here by calling CancelConversion();
delegate void ConversionComplete(string[] outputFiles);
This function is called after conversion and returns a list of output files.
private void button_Click(object sender, EventArgs e) { List<string> args = new List<string>(); args.Add("d:\\source\\source.mdb"); args.Add("-output=d:\\target\\target.csv"); args.Add("-separate=0"); //args.Add("-one more parameter"); args.Add("-key=YOUR_REGISTRATION_CODE"); mdb2csvAPI dll = new mdb2csvAPI(); dll.conversionDidFail += new mdb2csvAPI.ConversionDidFail( delegate(int code) { MessageBox.Show("Return code " + code.ToString()); } ); dll.conversionProgress += new mdb2csvAPI.ConversionProgress( delegate(int percent) { progressBar1.Value = percent; //if (condition) // dll.CancelConversion(); } ); dll.conversionComplete += new mdb2csvAPI.ConversionComplete( delegate(string[] outputFiles) { foreach (String s in outputFiles) { MessageBox.Show(s); } } ); dll.StartConversion(args.ToArray()); }