﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Teradata Forums / Drivers and UDFs / Teradata   / JDBC driver (java.sql.Driver impl., version 03.03.00.04) does not handle  correct the connect's "Properties" instance / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>Teradata Forums</description><link>http://www.teradata.com/teradataforum/</link><webMaster>info@teradata.com</webMaster><lastBuildDate>Thu, 04 Dec 2008 03:19:16 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: JDBC driver (java.sql.Driver impl., version 03.03.00.04) does not handle  correct the connect's "Properties" instance</title><link>http://www.teradata.com/teradataforum/Topic8000-11-1.aspx</link><description>In case it wasn't clear, this RFC was just created and has not yet been scheduled for a particular Teradata JDBC Driver release.</description><pubDate>Thu, 31 Jan 2008 11:50:17 GMT</pubDate><dc:creator>TomNolan</dc:creator></item><item><title>RE: JDBC driver (java.sql.Driver impl., version 03.03.00.04) does not handle  correct the connect's "Properties" instance</title><link>http://www.teradata.com/teradataforum/Topic8000-11-1.aspx</link><description>This issue corresponds to JDBC RFC DR 119654 -- support default Properties with DriverManager.getConnection(url, Properties)</description><pubDate>Wed, 30 Jan 2008 13:33:43 GMT</pubDate><dc:creator>TomNolan</dc:creator></item><item><title>JDBC driver (java.sql.Driver impl., version 03.03.00.04) does not handle  correct the connect's "Properties" instance</title><link>http://www.teradata.com/teradataforum/Topic8000-11-1.aspx</link><description>The driver's implementation of the method  "Connection connect(String url, java.util.Properties info)"&lt;br&gt;does not read correctly the properties stored in the "info" input parameter.&lt;br&gt;&lt;br&gt;The driver ignores the "user" and the "password" properties (and probably the other properties too)&lt;br&gt;if these properties are "default"/parent properties.&lt;br&gt;&lt;br&gt;&lt;br&gt;The following code fails to initialize the JDBC connection :&lt;br&gt;&lt;br&gt; Class.forName("com.ncr.teradata.TeraDriver");&lt;br&gt; Properties parentProps = new Properties();&lt;br&gt; parentProps.setProperty("user","myUser");&lt;br&gt; parentProps.setProperty("password","myPassword");&lt;br&gt; Properties props = new Properties(parentProps);&lt;br&gt; //the connection establishment fails because the driver fails to find the user and the password:&lt;br&gt; Connection con = DriverManager.getConnection(dbUrl,props); &lt;br&gt;&lt;br&gt;If parentProps are directly used, the connection creation succeeds !!!&lt;br&gt;&lt;br&gt;This means that Teradata is not able to handle correctly the java.util.Properties objects !&lt;br&gt;Somewhere inside the driver, Hashtable methods are directly used  (like get() or containsKey() ) and&lt;br&gt;parent/default properties are ignored !!&lt;br&gt;For getting a property or checking if it exists you should use only "getProperty()" !&lt;br&gt;     Fragment from the java.util.Properties#getProperty(String key) javadoc:&lt;br&gt;     * If the key is not found in this property list, the default property list,&lt;br&gt;     * and its defaults, recursively, are then checked. The method returns&lt;br&gt;     * &lt;code&gt;null&lt;/code&gt; if the property is not found.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</description><pubDate>Wed, 27 Jun 2007 05:59:24 GMT</pubDate><dc:creator>logofatu</dc:creator></item></channel></rss>