Re: Database datatype to c# datatype
- From: "Peter Kirk" <pk@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 31 May 2006 11:13:23 +0200
"Marc Gravell" <marc.gravell@xxxxxxxxx> skrev i en meddelelse
news:urmVT2IhGHA.4104@xxxxxxxxxxxxxxxxxxxxxxx
For most DAL purposes you know the type (per column) in advance, since you
designed the database; for more generic usage, you can always use
GetFieldType() and GetValue() on any IDataReader.
Would that do?
Not quite (I don't think), because I get metadata about a database column:
name
default value
is nullable
data type
ie, I get an IDataReader which contains some "string columns", which provide
information about a column in a database table.
One of the items of data describing the column is a string value which gives
the data type of the column. For example, this string value could be
"varchar" or "int".
I want to convert this string value to a c# datatype.
Peter
.
- References:
- Database datatype to c# datatype
- From: Peter Kirk
- Re: Database datatype to c# datatype
- From: Marc Gravell
- Database datatype to c# datatype
- Prev by Date: Re: Storing file bytes in SQL Server
- Next by Date: Re: Storing file bytes in SQL Server
- Previous by thread: Re: Database datatype to c# datatype
- Next by thread: Re: Signing a CAB file
- Index(es):
Relevant Pages
|