PC Review Forums Newsgroups Microsoft DotNet Microsoft ADO .NET Oracle's "number" field length at run-time?

Reply

Oracle's "number" field length at run-time?

 
Thread Tools Rate Thread
Old 22-03-2005, 03:32 PM   #1
Chris Botha
Guest
 
Posts: n/a
Default Oracle's "number" field length at run-time?


I am filling a DataTable using an OleDbDataAdapter from an Oracle database.
Setting the MissingSchemaAction to "AddWithKey" on the data adapter works
for text fields - the MaxLength for the text columns are filled correctly.
How the heck do I get the definition of a NUMBER field, thus the precision
and scale? Same applies to an SQL Server DECIMAL data type.

Thanks.


  Reply With Quote
Old 23-03-2005, 07:11 PM   #2
Jim Brandley
Guest
 
Posts: n/a
Default Re: Oracle's "number" field length at run-time?

The following select will doit:

Select column_name, data_type, data_length, data_precision, data_scale,
nullable, data_default
From dba_tab_columns
Where owner = 'Whatever your owner is' and table_name = :table_name order
by LOWER(column_name);


"Chris Botha" <chris_s_botha@AT.hotmail.com> wrote in message
news:OW8IXRvLFHA.3120@TK2MSFTNGP10.phx.gbl...
> I am filling a DataTable using an OleDbDataAdapter from an Oracle

database.
> Setting the MissingSchemaAction to "AddWithKey" on the data adapter works
> for text fields - the MaxLength for the text columns are filled correctly.
> How the heck do I get the definition of a NUMBER field, thus the precision
> and scale? Same applies to an SQL Server DECIMAL data type.
>
> Thanks.
>
>



  Reply With Quote
Old 24-03-2005, 02:28 AM   #3
Chris Botha
Guest
 
Posts: n/a
Default Re: Oracle's "number" field length at run-time?

Hi Jim, thanks, it works great.

"Jim Brandley" <Jim.Brandley@Intercim.com> wrote in message
news:#rgIMx9LFHA.2384@tk2msftngp13.phx.gbl...
> The following select will doit:
>
> Select column_name, data_type, data_length, data_precision, data_scale,
> nullable, data_default
> From dba_tab_columns
> Where owner = 'Whatever your owner is' and table_name = :table_name order
> by LOWER(column_name);
>
>
> "Chris Botha" <chris_s_botha@AT.hotmail.com> wrote in message
> news:OW8IXRvLFHA.3120@TK2MSFTNGP10.phx.gbl...
> > I am filling a DataTable using an OleDbDataAdapter from an Oracle

> database.
> > Setting the MissingSchemaAction to "AddWithKey" on the data adapter

works
> > for text fields - the MaxLength for the text columns are filled

correctly.
> > How the heck do I get the definition of a NUMBER field, thus the

precision
> > and scale? Same applies to an SQL Server DECIMAL data type.
> >
> > Thanks.
> >
> >

>
>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off