[teiid-commits] teiid SVN: r3239 - in branches/7.1.1.CP2/runtime/src/main/java/org/teiid: transport and 1 other directory.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Thu Jun 9 14:45:13 EDT 2011


Author: mdrillin
Date: 2011-06-09 14:45:13 -0400 (Thu, 09 Jun 2011)
New Revision: 3239

Modified:
   branches/7.1.1.CP2/runtime/src/main/java/org/teiid/odbc/ODBCServerRemoteImpl.java
   branches/7.1.1.CP2/runtime/src/main/java/org/teiid/transport/PgBackendProtocol.java
Log:
TEIID-1631 : ODBC SQLDescribeCol was not working when used with Prepare Statement

Modified: branches/7.1.1.CP2/runtime/src/main/java/org/teiid/odbc/ODBCServerRemoteImpl.java
===================================================================
--- branches/7.1.1.CP2/runtime/src/main/java/org/teiid/odbc/ODBCServerRemoteImpl.java	2011-06-08 23:02:33 UTC (rev 3238)
+++ branches/7.1.1.CP2/runtime/src/main/java/org/teiid/odbc/ODBCServerRemoteImpl.java	2011-06-09 18:45:13 UTC (rev 3239)
@@ -462,7 +462,12 @@
 		}
 		else {
 			try {
+				// The response is a ParameterDescription message describing the parameters needed by the statement,
 				this.client.sendParameterDescription(query.stmt.getParameterMetaData(), query.paramType);
+				
+				// followed by a RowDescription message describing the rows that will be returned when the statement  
+				// is eventually executed (or a NoData message if the statement will not return rows).
+				this.client.sendResultSetDescription(query.stmt.getMetaData(), query.stmt);
 			} catch (SQLException e) {
 				this.client.errorOccurred(e);
 			}

Modified: branches/7.1.1.CP2/runtime/src/main/java/org/teiid/transport/PgBackendProtocol.java
===================================================================
--- branches/7.1.1.CP2/runtime/src/main/java/org/teiid/transport/PgBackendProtocol.java	2011-06-08 23:02:33 UTC (rev 3238)
+++ branches/7.1.1.CP2/runtime/src/main/java/org/teiid/transport/PgBackendProtocol.java	2011-06-09 18:45:13 UTC (rev 3239)
@@ -214,7 +214,7 @@
 					if (paramType != null && paramType[i] != 0) {
 						type = paramType[i];
 					} else {
-						type = PG_TYPE_VARCHAR;
+						type = convertType(meta.getParameterType(i+1));
 					}
 					writeInt(type);
 				}



More information about the teiid-commits mailing list