PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WEBDEV 2024 → Updating tables from fields
Updating tables from fields
Débuté par Joel, 18 sep. 2008 17:31 - 3 réponses
Posté le 18 septembre 2008 - 17:31
If a page has fields from several tables, when you do a "PagetoFile()" and "Hadd()", will the system take care of getting the fields into the correct tables as long as they are linked correctly? If not, is there a method other than "PagetoFile()" that can handle this scenario?
Posté le 19 septembre 2008 - 09:34
The short answer: Yes.

Just be sure not to link the same field twice in the Screen.
Posté le 20 septembre 2008 - 02:02
I can't that to work. suggestions?

Hilario Perez Corona wrote in news message <463338f38ee2c7669ff40356da246a91@news.pcsoft>:
The short answer: Yes.

Just be sure not to link the same field twice in the Screen.


Posté le 25 septembre 2008 - 08:56
Can you bring more information on the error? You can ask for the specific error with HError, for example:

HReset(Products)

ScreenToFile()

// Perform additional calculations

HAdd(Products)

IF HError() THEN
// The record could not be added
Error(HErrorInfo())
END


Also you can put a breakpoint in the HAdd function to see the values of the files before adding the record to the file.


Cheers!

Hilario Perez Corona
Nabu Tecnologia en Software