Nonstop Database, HiRDB Version 9 UAP Development Guide
When developing a UAP that uses multiple threads, do not use the default connection text as the connection context. If multiple threads use the same connection context, an error occurs.
When using multiple threads, be sure to specify the connection context explicitly. An example in which the connection context is specified explicitly follows:
#sql context Ctx; public class sample{ public void main(String args[]){ Ctx con = null; #sql [con] {CONNECT}; //Explicit specification of connection context ... int data = 100; #sql [con] {INSERT INTO T1 VALUES(:data)}; //Explicit specification of connection context #sql [con] {DISCONNECT}; //Explicit specification of connection context } }
When using the SQLJ native interface edition, match the number of SELECT statement retrieval items with the number of columns of the iterator object to be used. If the two do not match, false errors may occur.
All Rights Reserved. Copyright (C) 2011, Hitachi, Ltd.