I have some questions/issues about the HXTT DBF file driver.
I have some VFP data which represents different companies, and the files are named accordingly. So all DBF files with names beginning ‘1_’ belong to Company 1, ‘b_’ to Company B, and so on.
The existing VFP application can handle this because it opens the files under aliases, so the code only ever refers to ‘pname’ as opposed to ‘1_pname’, ‘2_pname’ and so on.
Problem 1: The Servoy driver doesn’t seem to support this? Limiting I would have thought.
Also, I might have multiple company data sets in the same folder.
Problem 2: I only seem to be able to point the Servoy driver at a folder, at which point it enumerates all the DBF files in the folder, i.e. the assumption is that each folder is a ‘database’. Also very limiting.
The HXTT DBF driver is distributed by Servoy but is a product of a company in China.
The HXTT DBF driver allows you to access DBF files using SQL (Servoy) statements. The driver itself does not support the VFP ALIAS functionality, however, SQL does.
You can load the DBF data using a custom SQL select statements passing ‘pname’ as a parameter for the SQL alias.
I can’t see how to set the DataProvider of form elements programmatically though - in this scenario they would be bound to ‘pname’ but I can’t pick that at design time obviously.
My understanding of your problem is that you have multiple DBF tables that have identical column names. Each form element (field) references a column name of the table as a data provider. To switch between tables, all you have to do is execute the controller.loadRecords( custom_SQL, [ pname ] ) method, and the controller will populate the form elements automatically. You do not need a table alias, just the table name in the custom SQL statement.
Also, if you want direct control of the form elements, take a look at the Solution Model.