RE: Oracle Computed column datatype



Hi
In my example, the weight column is defined as number(5). The statement

select weight
,weight/2000 tons
from abc;

is executed and the result inserted in a ADODB.Recordset. Looking at the
column datatype of the recordset fields, I get adNumeric for column weight
but I get adVarWChar for the tons computed column. I expected the tons column
to be numeric since weight is a number datatype. So my questions are:
What is the behavior of the MS OLEDB Oracle driver in regards to Oracle
computed columns ?
How can the programmer influence this behavior ?(I want the tons column to
be numeric)

For your questions:
1) Obviously weight and weight/2000 give different value results... I am
concerned with datatype of those 2 columns in the resulting recordset. The
first is numeric. The second is character even though weight/2000 gives a
numeric result.
2) Weight is number(5).
3) SQL Server works OK, I know that. But my data is in Oracle.
4) I have not tried other numeric datatypes other than number.

TIA
SP


"Kevin Yu [MSFT]" wrote:

> Hi,
>
> First of all, I would like to confirm my understanding of your issue. From
> your description, do you mean that after opening the Recordset, Print
> rs.Field("weight").Type and Print rs.Field("tons").Type return different
> values? If there is any misunderstanding, please feel free to let me know.
>
> Could you let me know which data type the column weight is using? It works
> fine if I use SQL server. So I will try to do some research if I use it on
> Oracle. Will this also happen if you use other numeric types?
>
> Kevin Yu
> =======
> "This posting is provided "AS IS" with no warranties, and confers no
> rights."
>
>
.



Relevant Pages

  • Re: Pyramid stone?
    ... >>> granite beams weighing sixty tons (the ones for the ceiling ... but moving a 60 ton stone 1/2500th that weight over ... > landing after takeoff, ... The negative moment spreads out like a wave. ...
    (sci.archaeology)
  • Re: Pyramid stone?
    ... > If you were to try to lift 150,000 tons with 12 cranes ... >> sand is impossible. ... When the ship is built its weight is spread out over 4 ... >> landing after takeoff, ...
    (sci.archaeology)
  • Re: Pyramid stone?
    ... >> If you were to try to lift 150,000 tons with 12 cranes ... >>> sand is impossible. ... When the ship is built its weight is spread out over 4 ... >>> landing after takeoff, ...
    (sci.archaeology)
  • Re: Pyramid stone?
    ... Just 60 tons? ... but moving a 60 ton stone 1/2500th that weight over ... Sand is one of the better materials to build a road bed on as ... Lie down a layer ...
    (sci.archaeology)
  • Re: Martin Nova designs online: APR Extra
    ... > meiza wrote: ... Funny, since the weight is aft, in the engines, ... >>40 m in length, with weight about 700 tons, how fast would ... with 2 g's and 10 seconds burn time, ...
    (sci.space.history)