Re: OracleDataAdapter.Fill not mapping Oracle data types to .NET data types

Tech-Archive recommends: Fix windows errors by optimizing your registry



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/
>>
>
>


.



Relevant Pages