{
  "synLogic": "int $ret \u003d $api($1, $2);",
  "help": "File name can be mentioned with absolute path or just the file name.\nIn case of absolute path it will be stored on the mentioned path.\nIn case of file name it will be stored in TR/partition/ns_logs [Recommended]",
  "notes": "Data will always be appended in the file not truncated.",
  "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 Statement \u003c/td\u003e		\u003ctd\u003e A pointer to a statement object, which is presumably used to retrieve data from the database. \u003c/td\u003e	\u003c/tr\u003e	\u003ctr\u003e	\u003ctd\u003e File Name \u003c/td\u003e \u003ctd\u003e A string containing either an absolute path or a file name. If an absolute path is provided, the data will be stored in a file at that location. If only a file name is provided, the data will be stored in a file at the location TR/partition/ns_logs. \u003c/td\u003e \u003c/tr\u003e \u003c/table\u003e",
  "parameterization": "",
  "name": "ns_db_get_value_in_file",
  "syntax": "int ns_db_get_value_in_file(void *stmt, char *file)",
  "javaSyntax": "",
  "cEx": "flow()\n{\n  void *stmt = /* Some code that creates a statement object */;\n  char *file = \"data.txt\";  // Relative file path\n  int result = ns_db_get_value_in_file(stmt, file);\n  if (result == 0) {\n    printf(\"Data written to file.\");\n  } else {\n    printf(\"Error writing data to file.\");\n  }\n}",
  "javaEx": "",
  "insertStrC": "ns_db_get_value_in_file(void *stmt, char *file);",
  "insertStrJava": "",
  "description": "The ns_db_get_value_in_file API is used to store the output of the last SQL command executed using nd_db_execute() API in a file.",
  "component" : [
	{
      "id": "$1",
      "type": "TextField",
      "label": "Statement",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter Statement",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "labelVarCheckbox": "",
      "argIndex": 0,
      "validate": {
        "inputType": "Text",
        "disabled": false,
        "required": true,
        "min": 0,
        "max": 0
      }
    },
    {
      "id": "$2",
      "type": "TextField",
      "label": "File Name",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter filename",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "labelVarCheckbox": "",
      "argIndex": 0,
      "validate": {
        "inputType": "Text",
        "disabled": false,
        "required": true,
        "min": 0,
        "max": 0
      }
    }
  ]
}
