Re: OracleDataAdapter.Fill not mapping Oracle data types to .NET data types
- From: "Miha Markic [MVP C#]" <miha at rthand com>
- Date: Thu, 13 Oct 2005 17:21:27 +0200
If you are using INITCAP then you should know on which database field...
You can't blankly use it everywhere.
--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/
"Joe Hodsdon" <jh@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:%23mXkpdA0FHA.2008@xxxxxxxxxxxxxxxxxxxxxxx
> Hi Miha,
>
> I'm using INITCAP because the resulting DataTable is only used as the
> bound datasource of a ListBox. Users will choose filter criteria from from
> that listbox, so I want it to be presentable.
>
> I'm still learning (in fact, I'm a student), so I welcome any advice or
> alternatives.
>
> Thanks again,
> Joe
>
> "Miha Markic [MVP C#]" <miha at rthand com> wrote in message
> news:%23SE7qDA0FHA.460@xxxxxxxxxxxxxxxxxxxxxxx
>> Joe,
>>
>> "Joe Hodsdon" <jh@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
>> message news:utfo19$zFHA.3300@xxxxxxxxxxxxxxxxxxxxxxx
>>>I found my problem:
>>>
>>> "SELECT DISTINCT INITCAP(fieldname)" returns a string, even when the
>>> Oracle data type is NUMBER. If I remove the INITCAP function, the
>>> DataTable column is given the correct data type.
>>>
>>> Now my question is: how do I ask Oracle what data type a column is, so I
>>> can avoid using the INITCAP function on numeric types?
>>
>> Why are you using INITCAP in first place? It certainly returns a string
>> as its output is string.
>> Blindly using INITCAP on every field is a bit strange even if fields are
>> some sort of strings.
>>
>> --
>> Miha Markic [MVP C#]
>> RightHand .NET consulting & development www.rthand.com
>> Blog: http://cs.rthand.com/blogs/blog_with_righthand/
>>
>
>
.
- Follow-Ups:
- References:
- OracleDataAdapter.Fill not mapping Oracle data types to .NET data types
- From: news.microsoft.com
- Re: OracleDataAdapter.Fill not mapping Oracle data types to .NET data types
- From: Miha Markic [MVP C#]
- OracleDataAdapter.Fill not mapping Oracle data types to .NET data types
- Prev by Date: Re: How do you uniquely identify a connection in a connection pool
- Next by Date: Re: OracleDataAdapter.Fill not mapping Oracle data types to .NET data types
- Previous by thread: Re: OracleDataAdapter.Fill not mapping Oracle data types to .NET data types
- Next by thread: Re: OracleDataAdapter.Fill not mapping Oracle data types to .NET data types
- Index(es):
Relevant Pages
|