Re: Not possible using OCI?

From: craig sivils <casivils_at_lescsse.jsc.nasa.gov>
Date: 11 Mar 93 15:10:29 GMT
Message-ID: <casivils.731862629_at_node_508ba>


In <1993Mar10.053448.26262_at_netcom.com> tssmith_at_netcom.com (Tim Smith) writes:

>In article <1993Mar9.032927.768_at_csis.dit.csiro.au> dave_at_mizar.csis.dit.csiro.au (David Campbell) writes:
>>Is it not possible using OCI to get the precision and scale of a column?
>>
>>odsc() returns the type of a column in dbtype but doesn't provide the
>>precision or scale.
>>
>>I notice that if you're using the convoluted junk which is otherwise known
>>as PRO*C dynamic SQL, the sqlprc() call can return the precision and scale
>>but this doesn't seem to be part of the OCI interface.
 

>The ORACLE7 odescr() OCI routine returns precision and scale.
>With V6, you cannot get this info using the OCI.

SQL> desc user_tab_columns

 Name                            Null?    Type
 ------------------------------- -------- ----
 TABLE_NAME                      NOT NULL CHAR(30)
 COLUMN_NAME                     NOT NULL CHAR(30)
 DATA_TYPE                                CHAR(9)
 DATA_LENGTH                     NOT NULL NUMBER
 DATA_PRECISION                           NUMBER
 DATA_SCALE                               NUMBER
 NULLABLE                                 CHAR(1)
 COLUMN_ID                       NOT NULL NUMBER
 DEFAULT_LENGTH                           NUMBER
 DATA_DEFAULT                             LONG

It is possible to get this information in any V6 SQL based interface, the only question should be how much trouble will you have to go to.

                                    Craig
Received on Thu Mar 11 1993 - 16:10:29 CET

Original text of this message