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 » Sun Dec 11, 2011 4:42 pm

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: 4471
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 351 times
Been thanked: 104 times
Contact:

Post by esgici » Sun Dec 11, 2011 6:10 pm

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: 344
Joined: Wed Nov 21, 2012 7:14 pm
Location: México
Has thanked: 1 time
Been thanked: 4 times

Post by Leopoldo Blancas » Thu Jul 13, 2017 8:48 pm

Esgici: Is there another new version of DBA? :)
Greetings.

User avatar
esgici
Posts: 4471
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 351 times
Been thanked: 104 times
Contact:

Post by esgici » Thu Jul 13, 2017 11:42 pm

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: 344
Joined: Wed Nov 21, 2012 7:14 pm
Location: México
Has thanked: 1 time
Been thanked: 4 times

Post by Leopoldo Blancas » Fri Jul 14, 2017 12:38 am

Thanks for answering Mr. Esgici !!!
regards

User avatar
quartz565
Posts: 530
Joined: Mon Oct 01, 2012 12:37 pm
Location: Thessaloniki, Greece
Has thanked: 150 times
Been thanked: 13 times
Contact:

Post by quartz565 » Fri Jul 14, 2017 4:05 pm

Thank you my friend !!
Best Regards,
Nikos.

os: Windows Server 2012 - 64
hw: HP Server E5606, 2.13GHz, 8.00 GB - Intel Xeon CPU

ROBROS
Posts: 149
Joined: Thu May 25, 2017 6:30 pm
DBs Used: DBF
Has thanked: 47 times
Been thanked: 13 times

Post by ROBROS » 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

User avatar
esgici
Posts: 4471
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 351 times
Been thanked: 104 times
Contact:

Post by esgici » Fri Nov 16, 2018 9:03 pm

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: 149
Joined: Thu May 25, 2017 6:30 pm
DBs Used: DBF
Has thanked: 47 times
Been thanked: 13 times

Post by ROBROS » Sat Nov 17, 2018 10:02 am

Hi esgici,

thank you,
that's a good solution.

Robert

Jeff Stone
Posts: 37
Joined: Fri Jun 20, 2014 8:41 pm
Been thanked: 2 times

Post by Jeff Stone » Tue Nov 20, 2018 7:07 pm

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