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

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.awa
1 +XWiki.nlo
Content
... ... @@ -8,13 +8,12 @@
8 8  
9 9  == Creating a database query ==
10 10  
11 -{{figure image="001En.png" width="300"}}
12 -Creating a database query in {{formcycle/}}
13 -{{/figure}}
11 +{{id name="data_db_query"/}}
12 +{{figure image="data_db_query_de.png"}}Creating a database query in {{formcycle case="dat"/}}{{/figure}}
14 14  
15 15  * Enter a unique name.
16 16  * Select a database connection
17 -* Enter the SQL statement to be executed for the query
16 +* Enter the SQL statement to be executed for the query in the editor (see [[figure>>||anchor="data_db_query"]]).
18 18  
19 19  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.
20 20  
... ... @@ -26,7 +26,8 @@
26 26  http://<server>/formcycle/datenabfragedb
27 27  {{/code}}
28 28  
29 -The following URL parameters are supported.
28 +The servlet URL is displayed beneath the settings (see [[figure>>||anchor="data_db_query"]]).
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 [[form-specific JavaScript objects>>doc:Formcycle.FormDesigner.CodingPanel.ScriptTab.FormSpecificJavaScriptObjects]]. 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 [[metadata>>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