{"hidden":false,"children":[{"configs":{"itemId":"module"},"expanded":true,"children":[{"configs":{"quoted":"true","itemId":"text","js":"var rows = [{\n  ID_FIELD: SysUtil.getId(),\n  STRING_FIELD: 'value 1',\n  DATETIME_FIELD: new Date()\n}, {\n  ID_FIELD: SysUtil.getId(),\n  STRING_FIELD: 'value 2',\n  DATETIME_FIELD: new Date()\n}, {\n  ID_FIELD: SysUtil.getId(),\n  STRING_FIELD: 'value 3',\n  DATETIME_FIELD: new Date()\n}];\n//除varchar类型无需显式指定参数类型，其他类型建议显式指定参数类型，以适应跨数据库需要。在SQL Server中无需指定类型。具体取决于JDBC驱动对参数的理解。\n//如果使用批处理，app.run方法默认启用事务\napp.run('insert into WB_MISC (ID_FIELD,STRING_FIELD,DATETIME_FIELD)' +\n  ' values({?ID_FIELD?},{?nvarchar.STRING_FIELD?},{?timestamp.DATETIME_FIELD?})', {\n    arrayData: rows\n  });\n/*\n如果 arrayData 来自外部参数，可使用arrayName参数替代\napp.run(sql, {\n  arrayName: 'arrayParamName'\n});\n*/"},"expanded":false,"children":[],"type":"string"},{"configs":{"layout":"fit","itemId":"viewport1"},"expanded":true,"children":[{"configs":{"itemId":"xwl1","file":"m?xwl=sys/dialog/dev/script-editor"},"expanded":false,"children":[],"type":"xwl"}],"type":"viewport","events":{"afterrender":"app.xwl1.setValue(\"{#text#}\", null, true);"}}],"type":"module"}],"roles":{"demo":1},"title":"批处理","iconCls":"","inframe":false,"pageLink":""}