The return value of SxsSQLGetConnect and SxsSQLAllocHandle is not the handle you need.
Try the following:
<BR>PrintWriter outFile = new PrintWriter (newFileWriter(fileName));<BR>try { <BR><BR><BR>IntRef connectHdl = new IntRef (10000);<BR><BR><BR>int sqr = 0;<BR>int dbConnectHandle=0;<BR><BR><BR>// get connect handle<BR>sqr = SxsSQLGetConnect ("EmpSRA", "Administrator", "", connectHdl);<BR>if (sqr !=0) { outFile.println("ERROR: SxsSQLGetConnect returns " + sqr); }<BR>dbConnectHandle = intConnectHdl.getVal();<BR>//<BR><BR>IntRef stmtHdl = new IntRef (10000);<BR><BR><BR>int statementHandle=0; <BR>outFile.println("Statement handle execution starts");<BR><BR><BR>// get statement handle<BR>sqr = SxsSQLAllocHandle (SQL_HANDLE_STMT, dbConnectHandle, stmtHdl);<BR>if (sqr !=0) { outFile.println("ERROR: SxsSQLAllocHandle returns " + sqr); }<BR>statementHandle = stmtHdl.getVal();<BR>//<BR><BR>outFile.println("Statement handle succeeded");<BR>} <BR><BR><BR>finally {<BR>outFile.close();<BR>}<BR><BR><BR>
Best regards
Julius Geppert
Tamino Quality Engineering
Software AG
[This message was edited by Julius Geppert on 14 Aug 2002 at 08:38.]
#API-Management#webMethods#Tamino