HMG.3.4.2

HMG Unicode versions 3.1.x related

Moderator: Rathinagiri

jozef
Posts: 23
Joined: Sat Apr 02, 2016 4:53 pm
DBs Used: DBF
Location: Bratislava, Slovak Republic

Re: HMG.3.4.2

Post by jozef »

Hello all,

I have some question who knows answer.

In my part of code (see bottom) I needed add command "SELECT JEDNA_A" before command DBSETFILTER because without it I got runtime error "Area not in use". I dont understand it.

Code: Select all

   use (pracadr+"jedna_a.dbf") index ex_temp alias jedna_a new
   sel_val := win_exp_dav_1A.combo_1.value
   hodnota = ex_kody_lek[sel_val] 
   if    sel_val > 1
         select jedna_a 
         dbsetfilter({|| lekar = hodnota} , "lekar = hodnota") 
   else
         dbclearfilter()
   endif
Thanks for your answers.

Jozef
User avatar
mol
Posts: 3720
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: HMG.3.4.2

Post by mol »

jozef wrote:Hello all,

I have some question who knows answer.

In my part of code (see bottom) I needed add command "SELECT JEDNA_A" before command DBSETFILTER because without it I got runtime error "Area not in use". I dont understand it.

Code: Select all

   use (pracadr+"jedna_a.dbf") index ex_temp alias jedna_a new
   sel_val := win_exp_dav_1A.combo_1.value
   hodnota = ex_kody_lek[sel_val] 
   if    sel_val > 1
         select jedna_a 
         dbsetfilter({|| lekar = hodnota} , "lekar = hodnota") 
   else
         dbclearfilter()
   endif
Thanks for your answers.

Jozef
It's strange, because workarea JEDNA_A should stay selected after USE command.
You can use this code:

Code: Select all

 if    sel_val > 1
         jedna_a->(dbsetfilter({|| lekar = hodnota} , "lekar = hodnota") )
   else
         jedna_a->(dbclearfilter())
   endif
this behaviour depends from harbour, not hmg
Last edited by mol on Tue May 24, 2016 1:55 pm, edited 1 time in total.
jozef
Posts: 23
Joined: Sat Apr 02, 2016 4:53 pm
DBs Used: DBF
Location: Bratislava, Slovak Republic

Re: HMG.3.4.2

Post by jozef »

I found out that problem started when I put MSGBOX before command "IF" to test value of variable hodnota. Is it possible that msgbox change workarea?
Without msgbox command it is working well.
Jozef
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Re: HMG.3.4.2

Post by Pablo César »

I don't think so. Really not way.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Post Reply