Jump to content

Translations:Kexi/Tutorials/Drilling Down on Facebook Data/23/da: Difference between revisions

From KDE UserBase Wiki
Claus chr (talk | contribs)
Importing a new version from external source
 
(No difference)

Latest revision as of 08:14, 8 September 2012

Information about message (contribute)
This message has no documentation. If you know where or how this message is used, you can help other translators by adding documentation to this message.
Message definition (Kexi/Tutorials/Drilling Down on Facebook Data)
A possible bug in the above script is that it assumes there are no current records in the table, and creates primary keys starting at 1. It is OK to run the script once, but if it is run again, it won't overwrite records that have an ID matching what it is trying to insert. To make it more robust, it would need to first find out the current maximum of the ID field. This would be a good exercise to get used to writing scripts.

Et muligt problem i ovenstående script er, at det antager at der ikke allerede er poster i tabellen og at det opretter primære nøgler startende fra 1. Det er o.k. at køre scriptet en gang, man hvis det køres igen vil det ikke overskrive poster med ID'er som matcher den, det prøver at indsætte. For at gøre scriptet mere robust skal det først finde den aktuelle maksimum for ID-feltet. Dette er en god øvelse i at skrive scripts.