{
  "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": "char *retbuf \nThe output of the query is saved in this buffer. \nThe user can supply the memory for this buffer. In that case, the 3rd argument should be the size of buffer. \n\nIn case the 3rd argument is zero, a static buffer is populated by the API, which should be copied by the user of this API \n\nint retbuflen \nLength of the buffer if the memory is allocated by the caller. \n\nIf 0, the return string will be written to a static buffer, which the caller must copy \nReturns \n0 on Success, -1 on error",
  "returns": "",
  "arguments": "",
  "parameterization": "",
  "name": "ns_db_get_value",
  "syntax": "int ns_db_get_value(void *stmt, char *retbuf, int retbuf_len)",
  "javaSyntax": "",
  "cEx": "flow() \n{ \nchar buf[2048]; \nif(ns_db_get_value(stmt, buf, 2048) \u003d\u003d -1) \n{ \nhandle_error(); \n} \nprintf(\"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)"
      }
    }
  ]
}
