Bug 145679 [Regression]Failed to preview sqlserver data set with jtds1.1
Steps to reproduce: 1.Add jtds_1.1.jar to JAR Files, test connection, it's ok 2.New a data set, preview result Expected result: Data can be retrieved Actual result: A BIRT exception occurred. Plug-in Provider:Eclipse.org Plug-in Name:BIRT Data Engine Plug-in ID:org.eclipse.birt.data Version:2.1.0.N20060607-0632 Error Code:odaconsumer.CannotGetParameterMetaData Error Message:Cannot get ODA driver parameter metadata. Cannot retrieve the parameter metadata. The PreparedStatement.getParameterMetaData method is not implemented. Note: If change jtds_1.1 to jtds_0.9, it works.
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/executor/DataSourceQuery.java
}
	}
    
    /**
     * Adds Odi column hints to ODA statement
     *  
     * @param stmt
     * @throws DataException
     */
    private void addColumnHints( PreparedStatement stmt ) throws DataException
	{
    	assert stmt != null;
    	if ( resultHints == null || resultHints.size() == 0 )
    		return;
    	Iterator it = resultHints.iterator();
    	while ( it.hasNext())
    	{
    		IDataSourceQuery.ResultFieldHint hint = 
    				(IDataSourceQuery.ResultFieldHint) it.next();
    		ColumnHint colHint = new ColumnHint( hint.getName() );
    		colHint.setAlias( hint.getAlias() );
    		if ( hint.getDataType( ) == DataType.ANY_TYPE )
				colHint.setDataType( null );
			else
				colHint.setDataType( DataType.getClass( hint.getDataType( ) ) );
			if ( hint.getPosition() > 0 )
    			colHint.setPosition( hint.getPosition());
   			stmt.addColumnHint( colHint );
    	}
	}