First of all, I must state that I'm a complete newb when it comes to Delphi, allthough I did some Turbo Pascal programming in school, some fourteen years ago...
I have a comercial Delphi program which uses dBase database and BDE for accessing them. I basically need to interface another application written in C# to this database, to be able to do SQL operations such as select, insert, update and delete.
Unfortunaltely using OLEDB against dBase results in broken indexes, only native BDE apps seem to be able to safely access the data.
The general idea was to create a simple Delphi console application which could read SQL statements from standard input (Read/ReadLn) and output CSV data to standard output (WriteLn).
How would I go about doing this?
I have successfully gotten simple TTable-access to work, with the following code:
tbl := TTable.Create(nil);
tbl.DatabaseName := 'Exceline';
tbl.TableName := 'KUNDE.DBF';
tbl.Active := True;
WriteLn(tbl.RecordCount);
tbl.Active := False;
Is there a way I could achieve the same but by executing direct SQL statements instead?