Page 2 of 2

Re: Converter

Posted: Wed Jan 16, 2013 1:04 pm
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

Re: Converter

Posted: Wed Jan 16, 2013 10:10 pm
by ruben
thanks esgici... ;)

Re: Converter

Posted: Wed Jan 30, 2013 10:26 am
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

Re: Converter

Posted: Wed Jan 30, 2013 11:27 am
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

Re: Converter

Posted: Wed Jan 30, 2013 12:37 pm
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>

Re: Converter

Posted: Wed Jan 30, 2013 2:47 pm
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

Re: Converter

Posted: Wed Jan 30, 2013 4:55 pm
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!

Re: Converter

Posted: Fri Feb 01, 2013 8:57 pm
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