Creating your first dbf file

Utilities like DBU, Make, IDE written in HMG/ used to create HMG based applications

Moderator: Rathinagiri

Post Reply
bluebird
Posts: 172
Joined: Wed Sep 28, 2016 3:55 am
DBs Used: DBF

Creating your first dbf file

Post by bluebird »

After learning quite a lot of the programming basics and writing some none data programs, I need now to create my own xbase DBF file.

Does HMG have of know a create utility that a reader could recommend?

Thanks all
User avatar
CalScot
Posts: 303
Joined: Thu Mar 21, 2013 12:22 am
Location: California

Re: Creating your first dbf file

Post by CalScot »

Have you tried (from within IDE) selecting the menu items "Project" then "New Table"?
It's been a while since I used it, but I do remember that it worked.
Personally, I still prefer using dBaseIII to create .dbf files, but maybe you don't have a copy?
Good luck!
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Creating your first dbf file

Post by mol »

Do you mean whole database system, with a lot of tables, indexes realtions or creating one .dbf file?
If first, you need to study a lot of creating relation databases.
If second, you can use dbu.exe with a lot of variations of this tool.
You can create dbf file by DBCreate function:
(hmg\samples\advanced\memory_tables\demo.prg)

Code: Select all

Function CreateTable
*--------------------------------------------------------*

   DBCREATE("mem:test", {{"CODE", "C", 3, 0},{"NAME", "C", 50, 0},{"RESIDENTS", "N", 11, 0}},, .T., "memarea")

   DBAPPEND()
   REPLACE CODE WITH 'LTU', NAME WITH 'Lithuania', RESIDENTS WITH 3369600
   DBAPPEND()
   REPLACE CODE WITH 'USA', NAME WITH 'United States of America', RESIDENTS WITH 305397000
   DBAPPEND()
   REPLACE CODE WITH 'POR', NAME WITH 'Portugal', RESIDENTS WITH 10617600
   DBAPPEND()
   REPLACE CODE WITH 'POL', NAME WITH 'Poland', RESIDENTS WITH 38115967
   DBAPPEND()
   REPLACE CODE WITH 'AUS', NAME WITH 'Australia', RESIDENTS WITH 21446187
   DBAPPEND()
   REPLACE CODE WITH 'FRA', NAME WITH 'France', RESIDENTS WITH 64473140
   DBAPPEND()
   REPLACE CODE WITH 'RUS', NAME WITH 'Russia', RESIDENTS WITH 141900000

Return Nil
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Creating your first dbf file

Post by Pablo César »

  1. By IDE (as CalScot said). If you want to see a step-by-step, Esgici did a good job on his site:

    Https://vivaclipper.wordpress.com/2013/ ... b-manager/

    By the way, Rathi/Claudio. Is it possible to be included this contain (of course if Esgici permits to use his material) in our HMG doc ?
     
  2. Manually (as Marek said): inside your PRG.
     
  3. Using the old DBU / dBase or any other edit DBF utility.

    Here's under list:
    viewtopic.php?t=4082
    viewtopic.php?t=209
    viewtopic.php?t=4304
    http://www.pctoledo.com.br/forum/fileba ... t=c&page=1
    http://www.pctoledo.com.br/forum/fileba ... t=c&page=3
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Creating your first dbf file

Post by esgici »

...if Esgici permits to use his material in our HMG doc ?
Everything in VivaClipper is public domain; no permission required for any kind of use.
 
[*]Using the old DBU / dBase or any other edit DBF utility.
Here's under list:
...
http://hmgforum.com/viewtopic.php?f=10&t=42

and last release.

Viva HMG :D
Viva INTERNATIONAL HMG :D
User avatar
dragancesu
Posts: 920
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia

Re: Creating your first dbf file

Post by dragancesu »

+1
Post Reply