RE: Dynamic ctype?
- From: "MikeG" <MikeG@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 5 Jan 2006 06:58:02 -0800
Thanks Eric,
I was hoping to avoid a 'case' statement if possible.
Regards,
Mike
"Eric Giles" wrote:
> Why not create a 'hard coded' list for the purposes of this type conversion.
> I use Codesmith to produce my data access layer and when building the .NET
> classes, I use a function (that is a standard part of one of the CodeSmith
> templates) to produce compatible type definitions. The function is relatively
> small and I have had no problems with it at all. If you are interested, I
> could provide you with the type mappings I use.
>
> Regards,
>
> -Eric
>
>
> "MikeG" wrote:
>
> > I am attempting to write a 'factory' function to use in a generated data
> > access layer to accept a sqldbtype and convert it to the appropriate
> > system.type.
> >
> > I have attempted to use ctype (value, typename)
> > where value is the sqlreader field object and typename is a variable
> > containing the required type as a system.type and I'm getting nowhere.
> >
> > Any ideas appreciated.
> >
> > Thanks in anticipation,
> >
> > Mike
.
- Prev by Date: RE: not able to connect to sql server 2000
- Next by Date: Reflecting inherited interfaces
- Previous by thread: returning a dataset
- Next by thread: Re: Dynamic ctype?
- Index(es):
Relevant Pages
|