For example, if the database column is defined with a JDBC type of CHAR, the data type of the returned value for that column must be registered as Types. The Returning clause can return a single row or multiple rows.
The method your application uses to retrieve the values of returned columns depends on the number of rows the Returning clause returns as shown in the following examples.
Then, using an SQL statement with the SQLServer Statement object, it runs the SQL statement and places the data that it returns into an updateable SQLServer Result Set object.
The code file for this sample is named update RS.java, and it can be found in the following location: \samples\resultsets To run this sample application, you must set the classpath to include the file or the sqljdbc4file.If you are only doing INSERTs then you could use just the Db Store node. Output Expr File= ;line 1 (bs-set "query" "UPDATE Appointments Set Subject=:1 where id=:2") ;line 2 (sql-non-select $query 'Subject' 'Id') EOX prop:ls.sql User=sa prop:ls.sql Password=masked prop:ls.sql Service=ppc-ss-01 prop:ls.sql Interface=cli prop:binary=node Db Exec end:4d38d924031470e9 Error Log ERROR initializing expert output: Unable to load library 'wincli32': The specified module could not be found. 2011-01-21 ; Level: 2; Type: 0; Desc: "Unable to load library 'wincli32': The specified module could not be found."; File: "\src\brain_d\jigsaw\Code\Source\Misc\JLibrary.cpp"; Line: 125; Context: "JLibrary:: Open Library() - Win32 Impl" 2011-01-21 ; Level: 2; Type: 0; Desc: "...exception seen"; File: "\src\brain_d\ra_dev\code\source\expert\Sql Expr Util s.cpp"; Line: 163; Context: "Salmon:: NED:: Sql Expr Utils:: Initialize DB()" 2011-01-21 ; Level: 2; Type: 0; Desc: "...handling expression #2 in file"; File: "\src\brain_d\ra_dev\code\source\brain\Expr Table Io.If you want to do UPDATEs, then you'll have to configure a Db Execute node. cpp"; Line: 86; Context: "Salmon:: NED:: Expr Table Io::initialize()" 2011-01-21 ; Level: 2; Type: 0; Desc: "...exception seen"; File: "\src\brain_d\ra_dev\code\source\brain\Node Control.In some cases your query might return more than one result set, in this case and to preserve the compatibility when the returned result set object is converted to pure json, the next result sets are chained to the current result set under the property When dealing with large data sets, it is not advised to use API just described but to stream data since it avoids inflating the whole response into memory and JSON and data is just processed on a row by row basis, for example: You still have full control on when the stream is pauses, resumed and ended.For cases where your query returns multiple result sets you should use the result set ended event to fetch the next one if available.