[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Don Nablo

5/24/2002 8:07:00 PM

I want to find the type of data contained in an ODBC returned column.
Right now I am using an ODBCDataReader.getType(i) method.... But it returns
a lot more then I want to know and I can't find out if it is varChar. (I
don't think)

There is a nice ODBCTYPE enumeration but that does not match with the type
returned from getType.

Any Known ways to get the type of data in the column and compare it to
ODBCTYPE?

Should I be using a datareader?

Thanks in advance....


3 Answers

(Hussein Abuthuraya(MSFT))

5/25/2002 3:43:00 AM

0

Don Nablo

5/28/2002 6:16:00 PM

0

Thanks, I am half way there. But that function returns a string. I was
hoping for a matching enumerated type that matched ODBCtype enumeration....
The enumeration is already supported. and named.

Is this something I will have to right my self?

That is not a problem, or it would not be if more MS classes were actually
inheritiable. Kinda defeats the purpose of OO if you can't subclass what is
already there.

"Hussein Abuthuraya(MSFT)" <HussAbOnline@microsoft.com> wrote in message
news:Axvx814ACHA.2528@cpmsftngxa08...
> Don,
>
> To get a field data type using a datareader, use GetDataTypeName method.
Here is an example:
>
> results = results & myReader.GetDataTypeName(0) & vbTab &
myReader.GetDataTypeName(1) & vbNewLine
>
> I hope this helps!
>
>
> Thanks,
> Hussein Abuthuraya
> Microsoft Developer Support
>
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> Are you secure? For information about the Microsoft Strategic Technology
Protection Program and to order your FREE Security Tool Kit, please visit
> http://www.microsoft.co....
>


(Hussein Abuthuraya(MSFT))

5/31/2002 3:32:00 AM

0