{
  "synLogic": "int $ret \u003d $api($1, $2, $3);",
  "help": "The ns_db_get_value API is used to retrieve the output of the last SQL command executed using nd_db_execute() API.",
  "notes": "The memory for the retbuf buffer can be supplied by the user, in which case the 3rd argument should be the size of buffer.In case the 3rd argument is zero, a static buffer is populated by the API, which should be copied by the user of this API.\r\n The memory for the retbuf buffer can be supplied by the user, in which case the 3rd argument should be the size of buffer.In case the 3rd argument is zero, a static buffer is populated by the API, which should be copied by the user of this API.",
  "returns": "This api returns '0' on success and '-1' on failure.",
  "arguments": "\u003ctable class\u003d\"newGuiTable\"  style\u003d\"width:100%\" \u003e 	\u003ctr\u003e 		\u003cth\u003e Argument \u003c/th\u003e     		\u003cth\u003e Description \u003c/th\u003e     	\u003c/tr\u003e 	\u003ctr\u003e    		\u003ctd\u003e in_stmt \u003c/td\u003e     		\u003ctd\u003e Statement handle returned by ns_db_alloc_stmt_handle \u003c/td\u003e     	\u003c/tr\u003e 	\u003ctr\u003e    		\u003ctd\u003e retbuf \u003c/td\u003e     		\u003ctd\u003e This is the buffer in which the output of the query is saved. \u003c/td\u003e     	\u003c/tr\u003e  	\u003ctr\u003e    		\u003ctd\u003e retbuflen \u003c/td\u003e     		\u003ctd\u003e Length of the buffer if the memory is allocated by the caller. \u003c/td\u003e     	\u003c/tr\u003e  \u003c/table\u003e",
  "parameterization": "",
  "name": "ns_db_get_value",
  "syntax": "int ns_db_get_value(void *stmt, char *retbuf, int retbuf_len)",
  "javaSyntax": "",
  "cEx": "flow() \n{ \n  char buf[2048]; \n  if(ns_db_get_value(stmt, buf, 2048) \u003d\u003d -1) \n  { \n    handle_error(); \n  } \n  printf(\"Query result: %s\\n\", buf); \n\n}",
  "javaEx": "",
  "insertStrC": "ns_db_get_value(void *stmt, char *retbuf, int retbuf_len);",
  "insertStrJava": "",
  "description": "The ns_db_get_value API is used to retrieve the output of the last SQL command executed using nd_db_execute() API.",
  "component":[
   {
      "id": "$1",
      "type": "TextField",
      "label": "Statement",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Statement handle returned by ns_db_alloc_stmt_handle",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "labelVarCheckbox": "",
      "argIndex": 0,
      "validate": {
        "inputType": "Text",
        "disabled": false,
        "required": true,
        "min": 0,
        "max": 0,
        "method": "isValidVar(arg)"
      }
    },
    {
      "id": "$2",
      "type": "TEXT_VAR",
      "label": "Buffer Name",
      "labelVarCheckbox": "If Buffer name is a program variable.",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter buffer in which the output of the query is saved",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "validate": {
        "inputType": "Text",
        "required": true
      }
    },
    {
      "id": "$3",
      "type": "TextField",
      "label": "Length",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter length of buffer",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "labelVarCheckbox": "",
      "argIndex": 0,
      "validate": {
        "inputType": "Number",
        "disabled": false,
        "required": true,
        "min": 0,
        "max": 2147483647,
        "method": ""
      }
    },
        {
      "id": "$ret",
      "type": "TextField",
      "label": "Return Value",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter Return Value",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "labelVarCheckbox": "",
      "argIndex": 0,
      "validate": {
        "inputType": "Text",
        "disabled": false,
        "required": false,
        "method": "isValidVar(arg)"
      }
    }
  ]
}
