Converter

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

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

Re: Converter

Post by esgici »

ruben wrote:...I also found that i cannot open with HMG IDE single .prg file... :?:
Is there a way that i can do this?
As Marek said, every HMG application need one ( and only one ) project ( .hbp) file for building under HMG-IDE.

However you can build (compile) your project ( single or multiple .prg ) without HMG-IDE.

Please look at Basics\Building HMG Applications section in HMG-Doc ( online HMG-Help or embedded in HMG package\DOC ).

In addition, you may find some details in my humble blog.

Happy HMG'ing :D
Viva INTERNATIONAL HMG :D
User avatar
ruben
Posts: 5
Joined: Tue Jan 08, 2013 10:40 am

Re: Converter

Post by ruben »

thanks esgici... ;)
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Converter

Post by mol »

esgici wrote:
I don't know anything about "interpreter 'nova written in Harbour files .prg"
But Harbour has a wonderful interpreter in standard distribution : hb_run.


Hi Esgici!
I have one question:
Did you try to use hbrun.exe with success?

Can you post a little instruction how to use it?

I'm trying to open database and application returns error about DBUseArea()

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

Re: Converter

Post by esgici »

mol wrote: Did you try to use hbrun.exe with success?
Can you post a little instruction how to use it?
I'm trying to open database and application returns error about DBUseArea()
Yes Marek, I'm using it daily.

All right,I will write a "little" guide for you.

If you notice your instruction and error message possibly may recognize the problem.

Regards
Viva INTERNATIONAL HMG :D
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Converter

Post by mol »

When I try a little code:

Code: Select all

DBuseArea('ceny')
cResult := '""
do while !ceny->(eof())
cResult += ceny->NazwaCeny+chr(13)+chr(10)
ceny->(DBSKip())
enddo
? cResult
I'm getting error:

Code: Select all

c:\hmg\HARBOUR\bin>hbrun test1.hrb
Error BASE/9995  Corruption detected: HB_HRBLOAD (Quit)
Error BASE/9995  Corruption detected: HB_HRBLOAD
Called from HB_HRBLOAD(0)
Called from __HBSHELL(0)
Called from _APPMAIN(0)
c:\hmg\HARBOUR\bin>
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Converter

Post by esgici »

Hi Marek

instead of test1.hrb, required test1.PRG.

instead of DBuseArea('ceny') you need : DBuseArea(,,'ceny')

or simpler :

USE CENY

instead of "do while" ..

may be LIST NazwaCeny

If you invoke hbrun without script (.prg) file to execute, you may enter above commands by "dot prompt" of hbrun.

For execute your job via script ( .prg ) file, you need also declare field variables before using them:

FIELD NazwaCeny

Regards
Viva INTERNATIONAL HMG :D
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Converter

Post by mol »

thx! I'm starting to test!

after:
little modification and working fine:

Code: Select all

field nazwaceny
memvar cW 
cW := ""
use ceny
do while !eof()
  cW += nazwaceny + chr(13) + chr(10)
  skip
enddo
? cW
Many thanks Esgici!
Sometimes few words can help so much more!
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Converter

Post by esgici »

Hi
mol wrote: Sometimes few words can help so much more!
You are absolutely right :)
esgici wrote:All right,I will write a "little" guide for you.
Anyway, as promised ... :arrow:

Regards
Viva INTERNATIONAL HMG :D
Post Reply