Author: sumedha
Date: Fri Jan 18 22:36:20 2008
New Revision: 12498
Log:
support for mysql INOUT types for stored procedures
Modified:
branches/wsas/java/2.2/commons/data-services/src/main/java/org/wso2/ws/dataservice/DBUtils.java
Modified:
branches/wsas/java/2.2/commons/data-services/src/main/java/org/wso2/ws/dataservice/DBUtils.java
==============================================================================
---
branches/wsas/java/2.2/commons/data-services/src/main/java/org/wso2/ws/dataservice/DBUtils.java
(original)
+++
branches/wsas/java/2.2/commons/data-services/src/main/java/org/wso2/ws/dataservice/DBUtils.java
Fri Jan 18 22:36:20 2008
@@ -272,7 +272,10 @@
ResultSet rs = null;
try{
- rs = cs.executeQuery();
+ rs = cs.executeQuery();
+ if(rs.getMetaData().getColumnCount() == 0){
+ noResultSet = true;
+ }
}catch(SQLException e){
if(e.getMessage().indexOf("java.sql.CallableStatement.executeQuery() " +
"was called but no result set
was returned. " +
@@ -492,7 +495,8 @@
String elementValue = "";
Param param = query.getParam(resultSetFieldName);
if (param != null) {
- if ("OUT".equals(param.getType())) {
+ if ("OUT".equals(param.getType())
+ || "INOUT".equals(param.getType())) {
if (param.getSqlType().equals(
DBConstants.DataTypes.STRING)) {
elementValue =
cs.getString(param.getOrdinal());
_______________________________________________
Wsas-java-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/wsas-java-dev