NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Robert Iliuta on June 04, 2010, 04:33:09 AM

Title: Detect if there was any changes befor to Save the Form
Post by: Robert Iliuta on June 04, 2010, 04:33:09 AM
Hallo,


In a clarion app I have this code before Take Completed to detect if there was any changes.

  ! SALVEAZA data si user
  IF NOT SELF.Primary.Me.EqualBuffer(SELF.Saved)
     MEM:Data_Change = today()
     MEM:Time_Change = CLOCK()    !Save the system time
     MEM:User_change = glo_username
     MEM:Trimestrul_Change = gsQTR(today())
     MEM:Anul_Change = year(today())
     g:DataChanged = 1
  END

What is the equivalent code for Web Server?

Thank you,
Robert
Title: Re: Detect if there was any changes befor to Save the Form
Post by: Bruce on June 06, 2010, 10:19:10 PM
Hi Robert,

There's no direct comparison in the WebServer. Because of the multi-threaded, asyncronous nature of the web - not least the ability for a user to abandon a form without clicking save or cancel - it's not as straight-forward as for a Windows app.

Making a copy of the record before editing commences is something I'm thinking of adding as an option.

Cheers
Bruce
Title: Re: Detect if there was any changes befor to Save the Form
Post by: Robert Iliuta on June 07, 2010, 03:52:15 AM
Any workaround for this ?

Thank you,
Robert
Title: Re: Detect if there was any changes befor to Save the Form
Post by: kevin plummer on June 07, 2010, 06:30:51 AM
I use X-Files. It's a quick and easy way to save a record or bunch of records if you have child records and then easy to pull back into a group or queue when you need them. Actually you can't use Queues so I use the In-memory driver.
Title: Re: Detect if there was any changes befor to Save the Form
Post by: rjolda on June 07, 2010, 12:27:34 PM
Hi,
What is the persistence of IMM file?  Does it persist as long as the SERVER Exe is running and then die when the SERVER exe is closed?
THanks,
Ron Jolda
Title: Re: Detect if there was any changes befor to Save the Form
Post by: kevin plummer on June 07, 2010, 02:36:35 PM
no it ends with the Thread. That is why I write the record or records to XML and then load it back into the IMD at the validate routine
Title: Re: Detect if there was any changes befor to Save the Form
Post by: Alberto on June 07, 2010, 03:44:12 PM
I dont know the max lenght of a Session Variable but you could save the record in one session var and compare with it.
Hope this helps
Alberto