Is there an API to convert from a Database type to a .NET System type.

I could create a switch statement using the info here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconmappingnetdataproviderdatatypestonetframeworkdatatypes.asp
but was really hoping not to have to do this.

Thanks,
Dave

Re: Automatically Convert DB Type to .NET Type by Miha

Miha
Tue Apr 27 12:20:16 CDT 2004

Hi David,

You'll have to switch.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

"David Elliott" <DavidElliott@BellSouth.net.nospam> wrote in message
news:ni1t80pan4jnl9qsoa073g8kvr0auvievd@4ax.com...
> Is there an API to convert from a Database type to a .NET System type.
>
> I could create a switch statement using the info here:
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconmappingnetdataproviderdatatypestonetframeworkdatatypes.asp
> but was really hoping not to have to do this.
>
> Thanks,
> Dave
>



Re: Automatically Convert DB Type to .NET Type by William

William
Tue Apr 27 12:32:16 CDT 2004

David:

This happens automatically in most cases, so depending on what you want to
do, this may not be necessary. However, to answer your question, I don't
know of a function or API that will do all of them but I'm guessing there's
something in reflection that does it for you...haven't found it yet though.
"David Elliott" <DavidElliott@BellSouth.net.nospam> wrote in message
news:ni1t80pan4jnl9qsoa073g8kvr0auvievd@4ax.com...
> Is there an API to convert from a Database type to a .NET System type.
>
> I could create a switch statement using the info here:
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconmappingnetdataproviderdatatypestonetframeworkdatatypes.asp
> but was really hoping not to have to do this.
>
> Thanks,
> Dave
>