RE: Dynamic ctype?



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
.



Relevant Pages

  • Re: Strong name problem
    ... Thanks Mike. ... Atul ... > and non-Programming questions which go to this newsgroup. ... >> Regards, ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: Download & Parse Web Page How-To Recommendations
    ... Shane ... > using v1.40) It contains the TSMWeatherInfo component mentioned by Mike S ... send themselves a postcard and see where the postcard is within the ... >> Best Regards, ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: Rephrasing argument for typename and a different result
    ... > in the cell. ... But, the way your code is currently written, the TypeName ... >> Regards, ...
    (microsoft.public.excel.programming)
  • Re: Ability to join a domain
    ... Thanks, Mike. ... Best regards. ... > during a regular XP install. ... > Pleas not MCE 205 is based on Professional with certain features altered it ...
    (microsoft.public.windows.mediacenter)
  • Re: LMS Articulated DMU and railcars
    ... >>>Hi Mike ... >>>Its not the best picture in the world but ther is a colour ... >>>by David Jenkinson and Barry C Lane. ...
    (uk.rec.models.rail)