NetTalk Central

Author Topic: Refresh Netwebyear (Months)  (Read 3451 times)

jari@softmade.fi

  • Full Member
  • ***
  • Posts: 134
    • View Profile
    • Email
Refresh Netwebyear (Months)
« on: September 16, 2015, 12:32:17 AM »
Hello

I want to do On/Off type calendar and thats why I added the following code in Start of "Procedure Setup"

    if p_Stage=0
         do openfiles
        Vka:pvm=  p_web.GetValue('_Date_')
        Vka:ind=  p_web.GSV('vak:ind')
        Vakioajon_pvm{prop:sql}='select * from Vakioajon_pvm where ind='&vka:ind&' and pvm='&Vka:pvm
        next(Vakioajon_pvm)
          if error()
            Vka:pvm=  p_web.GetValue('_Date_')
            Vka:ind=  p_web.GSV('vak:ind')
               Access:Vakioajon_pvm.Insert
            ELSE
              Vakioajon_pvm{prop:sql}='delete from Vakioajon_pvm where ind='&vka:ind&' and pvm='&Vka:pvm
         .
         ans = band(p_stage,255)   
         return(ans)
    .
       omit('!!!')     !       I removed all the remaining codes
   
       .....
        !!!

That works fine expeted the Netwebyear does not refersh after pressing the date button.

What is missing in my code ?

Thanks

Jari

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Refresh Netwebyear (Months)
« Reply #1 on: September 16, 2015, 02:07:08 AM »
you are only doing something when Stage = 0.

I recommend you turn on "send stage to debugview" and see the stages that happen as you interact with the window.

cheers
Bruce

jari@softmade.fi

  • Full Member
  • ***
  • Posts: 134
    • View Profile
    • Email
Re: Refresh Netwebyear (Months)
« Reply #2 on: September 16, 2015, 02:31:14 AM »
Thanks Bruce

The problem is not the addition or deletion of data.
That works. But how do I get the day button refreshed after button is pressed