Exporting to CSV with dynamic field type handling
Posted
by serhio
on Stack Overflow
See other posts from Stack Overflow
or by serhio
Published on 2010-04-02T10:13:27Z
Indexed on
2010/04/02
10:23 UTC
Read the original article
Hit count: 203
I have to do an export from DB to CSV.
field; fileld; field... etc
Have 3 types of fields: Alpha, Numeric and Bool respresented as "alphaValue"
,intValue
and True/False
.
I try to encapsulate this in a fields collection, in order to export if alpha then set "", if Bool=>True/False if numeric let as is.
and try to build a CsvField
class:
Public Structure?Class CsvField(Of T As ???)
End Structure
Enum FieldType
Alpha
Bool
Numeric
End Enum
any suggestions welcomed.
© Stack Overflow or respective owner