Page 1 of 1

Databuilder and dbfbuilder for samples files

Posted: Tue Dec 21, 2021 10:04 am
by Marc Venken
In order to get help from the forum, we like to have a working sample. For that to work, we sometimes need to have dbf's and data that are not in the samples directory.

I found source in the FWDBU sample from Fivetech that will build program code from a selected database (dbf and index) . This code can be copied into the sample program and executed with a Opendatabase() function.

Can fivetech provide also a function that will fill the database with a selected amound of data?

Lets say that we want (2 records from customer)

Makesample("customer",2) // take 2 customers and make program code for it.
makesample("Invoices","FIRST', "ANTONIO",5) // Take 5 records from invoices with the data "Antonio" in the field FIRST

The result should we written as program code (for copy and paste) in the sample's Opendatabase() that we like to punt on the forum for help.

Can this be done ??

Re: Databuilder and dbfbuilder for samples files

Posted: Tue Dec 21, 2021 3:16 pm
by Antonio Linares
Dear Marc,

Long time ago... (it sounds like Star Wars intro :-)) there was a company named successware that distributed an utility named dbcre8. It was a closed utility that basically does what you describe, but they never provided the source code for it.

But here at FiveTech we decided to provide it, open source and free for all and you can find it at c:\FWH\samples\dbcre8.prg

Simply do buildh.bat dbcre8 and enjoy it. As you have full source code for it, you can modify it and enhance it the way you may need it

Re: Databuilder and dbfbuilder for samples files

Posted: Thu Dec 23, 2021 7:29 am
by José Luis Sánchez
I didn't know this sample, and it has surprised me. Great job Antonio !!

Regards,