Yet another DBU

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

Moderator: Rathinagiri

JosK
Posts: 46
Joined: Tue Nov 08, 2011 11:38 pm

Re: Yet another DBU

Post by JosK »

With dba.exe i can not open this file:

proc main()
local i
rddsetdefault( "DBFCDX" )
dbcreate( "test", { {"USERID", "+", 4, 0 }, { "NAME", "C", 20, 0 } } )
//(autoincrement see + by userid)
use test
for i :=1 to 10
dbappend()
next

with hbide -> view -> idedbu it shows the test.dbf
(userid is 1, 2 to 10)

is there a dbu.exe of dba.exe that also kan open the autoincrement .dbf ?
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Yet another DBU

Post by esgici »

JosK wrote:With dba.exe i can not open this file:
...
is there a dbu.exe of dba.exe that also kan open the autoincrement .dbf ?
Sadly, DBA doesn't support yet extended field types of Harbour :(

May be at the future ;)

Regards

--

Esgici
Viva INTERNATIONAL HMG :D
Leopoldo Blancas
Posts: 388
Joined: Wed Nov 21, 2012 7:14 pm
Location: México

Re: Yet another DBU

Post by Leopoldo Blancas »

Esgici: Is there another new version of DBA? :)
Greetings.
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Yet another DBU

Post by esgici »

Leopoldo Blancas wrote: Thu Jul 13, 2017 8:48 pm Esgici: Is there another new version of DBA? :)
Greetings.
Thank to interest Leopoldo :)

But in my side sadly no :(

(Dear Louis Vasquez may works on it)

If exist such thing, will be announced first in this forum :arrow:

Happy HMG'ing :D
Viva INTERNATIONAL HMG :D
Leopoldo Blancas
Posts: 388
Joined: Wed Nov 21, 2012 7:14 pm
Location: México

Re: Yet another DBU

Post by Leopoldo Blancas »

Thanks for answering Mr. Esgici !!!
regards
User avatar
quartz565
Posts: 667
Joined: Mon Oct 01, 2012 12:37 pm
Location: Thessaloniki, Greece
Contact:

Re: Yet another DBU

Post by quartz565 »

Thank you my friend !!
Best Regards,
Nikos.

os: Windows Server 2019 - 64
ROBROS
Posts: 256
Joined: Thu May 25, 2017 6:30 pm
DBs Used: DBF
Location: D 83071 Stephanskirchen

Re: Yet another DBU

Post by ROBROS »

Hi friends,
I have downloaded hmgdbu as well as dba, in both apps I have a menu item to modify structure. and I can do a "modi stru". But I haven't found a way to erase a field in either app.

Can someone help please? Or do I have to go back to dosbox, where dbase is installed, and do it by dbase prompt?

Anyway thanks for both apps.

TIA
Robert
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Yet another DBU

Post by esgici »

ROBROS wrote: Fri Nov 16, 2018 7:06 pm Hi friends,
I have downloaded hmgdbu as well as dba, in both apps I have a menu item to modify structure. and I can do a "modi stru". But I haven't found a way to erase a field in either app.

Can someone help please? Or do I have to go back to dosbox, where dbase is installed, and do it by dbase prompt?

Anyway thanks for both apps.

TIA
Robert
Hi Robert

Modifying structure of .DB file is a highly complicated process; even for most sophisticated db manager software.

Complication depends details of modification; does field count, names , type etc changed or not ?

For simple modification process is also simple:

- Define a new structure for target dbf
- Build an empty dbf with that structure
- Append old dbf to new one via APPEND FROM command

Without changed field specifications (decreased or increased field counts) this method runs well.

Without M (memo) field type we have another method:

USE <oldDBfile>
- COPY TO <newDBfile> SDF

Do necessary editing on this SDF by using any text editor

Build and USE a new empty dbfile depending that SDF

APPEND FROM <oldDBfile>

That is all

Happy HMG'ing :D
Viva INTERNATIONAL HMG :D
ROBROS
Posts: 256
Joined: Thu May 25, 2017 6:30 pm
DBs Used: DBF
Location: D 83071 Stephanskirchen

Re: Yet another DBU

Post by ROBROS »

Hi esgici,

thank you,
that's a good solution.

Robert
Jeff Stone
Posts: 44
Joined: Fri Jun 20, 2014 8:41 pm

Re: Yet another DBU

Post by Jeff Stone »

Hi Robert,

Perhaps I am misunderstanding what you're intending to do, but I would try the following assuming:
fld_to_delete is the number of the field you want to delete
file_to_mod is the name of the dbf you are trying to modify/delete a field

copy structure extended to temp
use temp
goto fld_to_delete
delete next 1
pack
rename (file_to_mod) to temp2
create (file_to_mod) from temp
append from temp2
erase temp2.dbf
erase temp.dbf

Regards,

Jeff
Post Reply