DBF Create Code

You can share your experience with HMG. Share with some screenshots/project details so that others will also be benefited.

Moderator: Rathinagiri

User avatar
swapan
Posts: 242
Joined: Mon Mar 16, 2009 4:23 am
Location: Kolkata, India
Contact:

Re: DBF Create Code

Post by swapan »

sudip wrote:Hello,

I just created a small utility, which generates code for creating dbf files.
Xcellent work Sudip! And Thanks a lot for sharing the source with us.

I can suggest a feature which may be added to this utility.
During our coding for entry program (with modify/delete options) with the fields of a dbf we do the following things:

1) Declaration of field variables
1) Initilization of Field Variables
2) Storing record's value to Variables: Seek the value of the key field and assign the field values to the field variables.
3) Data Replacement :values from field variables to fields.

These sections can be automated and help a lot during writing an entry program.


Regrds,

Swapan
Thanks & Regards,
Swapan Das

http://www.swapandas.com/
User avatar
sudip
Posts: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: DBF Create Code

Post by sudip »

Hi Swapan,

Thanks for your kind words and suggestions. Can you please tell details about your suggestion? Only single table entry, or Master-Detail entry? It will be an excellent app!!! :) :D :o

(For time being, I am searching for a good project, which I can do with HMG ;) )

A very good app about your suggestion is already there by Mustafa.
Please go through following link viewtopic.php?f=9&t=628

Regards.

Sudip
With best regards,
Sudip
User avatar
swapan
Posts: 242
Joined: Mon Mar 16, 2009 4:23 am
Location: Kolkata, India
Contact:

Re: DBF Create Code

Post by swapan »

sudip wrote: (For time being, I am searching for a good project, which I can do with HMG ;) )
BTW looking for a Paid or Free job (the HMG project)?!
If its free I can help! :D
Yes a real poject can help us a lot................................................................
Its good that you are ready for that..........


Rgds,

Swapan
Thanks & Regards,
Swapan Das

http://www.swapandas.com/
User avatar
sudip
Posts: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: DBF Create Code

Post by sudip »

Hello,

I found problem using my code in real life. There was a bug. I corrected it.

Please download the source code and compile.
DBFCreate.rar
(2.1 KiB) Downloaded 706 times
With best regards.

Sudip
With best regards,
Sudip
User avatar
Ismach
Posts: 161
Joined: Wed Nov 28, 2012 5:55 pm
DBs Used: DBF, mySQL, Mariadb, postgreSQL, Oracle, Db2, Interbase, Firebird, and SQLite
Location: Buenos Aires - Argentina

Re: DBF Create Code

Post by Ismach »

Estimado Sudip y colegas
me tomado el atrevimiento de modificar y agrandar tu codigo, aun queda mucho por hacer pero me he quedado sin tiempo, lo subo igual para no perderlo para que lo usen o lo sigan modifcando y/o haciendo nuevas versiones, pero me resulto muy divertido. Si en algun momento tengo tiempo libre lo seguire
Saludos
Ismach
Attachments
DbfCreate.zip
(2.07 MiB) Downloaded 145 times
hansmarc
Posts: 40
Joined: Thu Jun 23, 2016 5:38 am
Location: Belgium

Re: DBF Create Code

Post by hansmarc »

Hello,

did you already give a look at Otis.
see Otis, update V1.21 06/05/2021

A free utility where in you will find a structure editor, table inspector and a tool to create a prg or a csv for the opened table and index files.

regards
Hans
RPC
Posts: 281
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF

Re: DBF Create Code

Post by RPC »

Ismach wrote: Sat May 08, 2021 2:03 am Estimado Sudip y colegas
me tomado el atrevimiento de modificar y agrandar tu codigo, aun queda mucho por hacer pero me he quedado sin tiempo, lo subo igual para no perderlo para que lo usen o lo sigan modifcando y/o haciendo nuevas versiones, pero me resulto muy divertido. Si en algun momento tengo tiempo libre lo seguire
Saludos
Ismach
Hi Ismach
I tried compiling your program in MiniGUI but got following error

****
hbmk2: Processing environment options: -comp=bcc
hbmk2: Compiling resources...
Borland Resource Compiler Version 5.40
Copyright (c) 1990, 1999 Inprise Corporation. All rights reserved.

Error dbfcreate.rc 18 47: Invalid bitmap format
hbmk2[DBFCreate]: Error: Running resource compiler. 20018
brcc32.exe -Ic:\borland\bcc58\Include -Ic:\borland\bcc58\Include\dinkumware -Ic:\minigui\harbour\include -Ic:\minigui\include -IC:\USERS\RPCCH\DOWNLO~1\DBFCRE~1\DBFCRE~1 -IC:\Users\rpcch\Downloads\DbfCreate2\DbfCreate C:\USERS\RPCCH\DOWNLO~1\DBFCRE~1\DBFCRE~1\dbfcreate.rc -foOBJ\dbfcreate.res

****
Failure!

Can you please help resolve it
thank you
User avatar
Ismach
Posts: 161
Joined: Wed Nov 28, 2012 5:55 pm
DBs Used: DBF, mySQL, Mariadb, postgreSQL, Oracle, Db2, Interbase, Firebird, and SQLite
Location: Buenos Aires - Argentina

Re: DBF Create Code

Post by Ismach »

Hola
deberias editar el .rc y anular la 2 ultimas lineas asi:

Code: Select all

// ZSERVER 
// ZPREFERENCES 
y compilar nuevamente
RPC
Posts: 281
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF

Re: DBF Create Code

Post by RPC »

Ismach wrote: Tue May 11, 2021 7:38 pm Hola
deberias editar el .rc y anular la 2 ultimas lineas asi:

Code: Select all

// ZSERVER 
// ZPREFERENCES 
y compilar nuevamente
Hi Ismach
I have commented the two lines in .rc file but I am still getting the following mistake

****
hbmk2: Processing environment options: -comp=bcc
hbmk2: Compiling resources...
Borland Resource Compiler Version 5.40
Copyright (c) 1990, 1999 Inprise Corporation. All rights reserved.
Borland Resource Compiler Version 5.40
Copyright (c) 1990, 1999 Inprise Corporation. All rights reserved.

Error _temp.rc 6 14: Cannot open file: C:\hmg.3.4.4\\RESOURCES
hbmk2[DBFCreate]: Error: Running resource compiler. 20018
brcc32.exe -Ic:\borland\bcc58\Include -Ic:\borland\bcc58\Include\dinkumware -Ic:\minigui\harbour\include -Ic:\minigui\include -IC:\USERS\RPCCH\DOWNLO~1\DBFCRE~1\DBFCRE~1 -IC:\Users\rpcch\Downloads\DbfCreate2\DbfCreate C:\USERS\RPCCH\DOWNLO~1\DBFCRE~1\DBFCRE~1\_temp.rc -foOBJ\_temp.res

****
Failure!
I have installed hmg.3.4.4 and path c:\hmg.3.4.4\RESOURCES exists
I am using IDE to compile.
Pls help
Thanks
User avatar
Claudio Ricardo
Posts: 367
Joined: Tue Oct 27, 2020 3:38 am
DBs Used: DBF, MySQL, MariaDB
Location: Bs. As. - Argentina

Re: DBF Create Code

Post by Claudio Ricardo »

Hi... HMG 3.4.4 use MinGw not Bcc58 (MiniGui use this), IMHO you have a issue in path... Change #include <minigui.ch> to #include <hmg.ch>
in "dbfcreate.prg" and try using F5 or Run button from HMG IDE.
Corrige al sabio y lo harás más sabio, Corrige al necio y lo harás tu enemigo.
WhatsApp / Telegram: +54 911-63016162
Post Reply