Re: blob and clob describe.
Posted in 2004
ahum
> according to the jdbc manual the type for clob is IfxTypes.IFX_TYPE_CLOB and
> blob is IfxTypes.IFX_TYPE_BLOB translating to 102 and 101.
Never mind found an ugly hack:
if ( themetadata.getIfxColumnType(thecolno) == 41 ) {
if ( themetadata.getExtendedName(thecolno).compareTo("blob") == 0 ){
setcoltype( IfxTypes.IFX_TYPE_BLOB);
} else {
if ( themetadata.getExtendedName(thecolno).compareTo("clob") == 0 ){
setcoltype( IfxTypes.IFX_TYPE_CLOB);
}..................
Now let's hope themetadata.getIfxColumnType(thecolno) == 41 will not change...
Superboer.
superboer7@planet.nl (superboer) wrote in message news:<bb790a36.0412012349.1f989e4e@posting.google.com>...
> Engine V9.3 on linux
> jdbc V 2.21.JC3 or clientsdk the dyn_sql.ec
>
> When i create a table like
>
> create table clobtest ( a int, b clob) ;>
> create table blobtest ( a int, b blob) ;>
> and i try to figure out what the coltype is using
> metadata.getIfxColumnType(...) i get back 41 for both occasions.
>
> This is also the case when i try the same using esql/c with
> $INFORMIXDIR/demo/esqlc/dyn_sql.ec
>
> according to the jdbc manual the type for clob is IfxTypes.IFX_TYPE_CLOB and
> blob is IfxTypes.IFX_TYPE_BLOB translating to 10 and 11.
>
> when i do a select from syscolumns i see 41 in coltype and 10 and 11
> in extended_id.
>
> The question is what am i doing wrong; what should i use in order to identify
> a clob col or a blob col in java.
>
> Comments are apriciated.
>
> Superboer.