Monday, January 24, 2005

using metadata with toolbox

using metadata with toolbox: "using metadata with toolbox
Hi
I was retrieving the metadata information for a table in our DB ,
We use connection pooling , So the sam connection might be used again,

When I change the column heading for the fields in the table, and run the program to get the metadata it is giving me the old info

Is this an expected behaviour. The only reason I can think about is because of the same connection object
Pls advise
TIA

http://www-912.ibm.com/j_dir/JTOpen.nsf/2bd4742db2e03c7b862568230070dbd3/05d8393b0a07369886256f8c004edf89?OpenDocument

Re: using metadata with toolbox
Are you using extended metadata support at all? If you are not using extended metadata support. ResultSetMetaData.getColumnLabel() will return the same thing as ResultSetMetaData.getColumnName(). Try setting the "extended metadata" connection property to true.

Property Name: "extended metadata"

Description: Specifies whether the driver should request extended metadata from the server. Setting this property to true increases the accuracy of the information returned from the following ResultSetMetaData methods:
getColumnLabel(int)
isReadOnly(int)
isSearchable(int)
isWriteable(int)
Additionally, setting this property to true enables support for the ResultSetMetaData.getSchemaName(int) method. Setting this property to true may slow performance because it requires retrieving more information from the server. Leave the property as the default (false) unless you need more specific information from the listed methods. For example, when this property is off (false), ResultSetMetaData.isSearchable(int) always returns "true" because because the driver does not have enough information from the server to make a judgment. Turning on this property (true) forces the driver to get the correct data from the server.

You can use extended metadata only when connecting to a server running OS/400 V5R2 or i5/OS.

Required: no

Options: "true","false"

Default: "false"


Is this an expected behaviour. The only reason I can think about is because of the same connection object
Pls advise
TIA"

No comments:

Post a Comment