{
  "synLogic": "int $ret \u003d $api($1);",
  "help": "The ns_db_connect API establishes a connection to the destination database using the connection string passed as argument\r",
  "notes": "The connection handle is allocated in ns_db_odbc_init() API itself.It is mandatory to call the ns_db_odbc_init() before calling this API.",
  "returns": "This api returns '0' and '-1' on failure.",
  "arguments": "",
  "parameterization": "",
   "component": [
    {
      "id": "$1",
      "type": "TextField",
      "label": "Connection String",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Connection string",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "labelVarCheckbox": "",
      "argIndex": 0,
      "validate": {
        "inputType": "Text",
        "disabled": false,
        "required": true,
        "min": 0,
        "max": 0,
        "method": ""
      }
    },
    {
      "id": "$ret",
      "type": "TextField",
      "label": "Return Variable",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter Return Variable",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "labelVarCheckbox": "",
      "argIndex": 0,
      "validate": {
        "inputType": "Text",
        "disabled": false,
        "required": true,
        "min": 0,
        "max": 0,
        "method": "isValidVar(arg)"
      }
    }
  ],
  "name": "ns_db_connect",
  "syntax": "int ns_db_connect(char *conn_str)",
  "javaSyntax": "",
  "cEx": "flow()\n{\n  if(ns_db_connect(\"DSN\u003dPostgreSQL; Username\u003dnetstorm; Database\u003dtest\") \u003d\u003d -1)\n  {\n    handle_error();\n  }\n}",
  "javaEx": "",
  "insertStrC": "ns_db_connect(char *conn_str);",
  "insertStrJava": "",
  "description": "The ns_db_connect API establishes a connection to the destination database using the connection string passed as argument\r"
}
