From version < 7.1 >
edited by nlo
on 08.05.2019, 17:05
To version < 6.2 >
edited by awa
on 11.04.2019, 16:44
< >
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.nlo
1 +XWiki.awa
Content
... ... @@ -8,12 +8,13 @@
8 8  
9 9  == Creating a database query ==
10 10  
11 -{{id name="data_db_query"/}}
12 -{{figure image="data_db_query_de.png"}}Creating a database query in {{formcycle case="dat"/}}{{/figure}}
11 +{{figure image="001En.png" width="300"}}
12 +Creating a database query in {{formcycle/}}
13 +{{/figure}}
13 13  
14 14  * Enter a unique name.
15 15  * Select a database connection
16 -* Enter the SQL statement to be executed for the query in the editor (see [[figure>>||anchor="data_db_query"]]).
17 +* Enter the SQL statement to be executed for the query
17 17  
18 18  The entered SQL statement is executed as a prepared statement, which prevents SQL injection attacks. You should not and need not use inverted commas (` or '). Also, you can use question marks ( ? ) as placeholders to build queries dynamically.
19 19  
... ... @@ -25,8 +25,7 @@
25 25  http://<server>/formcycle/datenabfragedb
26 26  {{/code}}
27 27  
28 -The servlet URL is displayed beneath the settings (see [[figure>>||anchor="data_db_query"]]).
29 -The following URL parameters are supported:
29 +The following URL parameters are supported.
30 30  
31 31  |=Name of the paramter|=Description|=Required
32 32  |name|Must match the name of the database query.|Yes
... ... @@ -37,7 +37,7 @@
37 37  |varName|Allows you to change name of the JSON response object. If not given, a plain JSON object with the result data is returned.|No
38 38  |delimiter|The delimiter for the placeholder values, see //queryParameter//. Defaults to a comma {{code}},{{/code}}|No
39 39  
40 -When accessing a database servlet from a form, always use the database URL contained in the global object //XFC_METADATA//, see also the [[metadata>>doc:Formcycle.FormDesigner.CodingPanel.ScriptTab.FormMetadata]]. For example: {{code language="javascript"}}XFC_METADATA.urls.datasource_db{{/code}}.
40 +When accessing a database servlet from a form, always use the database URL contained in the global object //XFC_METADATA//, see also the [[form-specific JavaScript objects>>doc:Formcycle.FormDesigner.CodingPanel.ScriptTab.FormMetadata]]. For example: {{code language="javascript"}}XFC_METADATA.urls.datasource_db{{/code}}.
41 41  
42 42  Further we recommend you use the script function [[getDataQuery>>doc:Formcycle.FormDesigner.CodingPanel.ScriptTab.AdditionalScriptFunctions.GetDataQuery]], so you do not have to setup the servlet request manually. The result of the database query is returned as //JSON//.
43 43  
Copyright 2000-2024