![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello: I defined a datatable to have two columns: ' Add three column objects to the table. idColumn = New DataColumn() idColumn.DataType = System.Type.GetType("System.String") idColumn.ColumnName = "CaseId" dtTable.Columns.Add(idColumn) idColumn = New DataColumn() idColumn.DataType = System.Type.GetType("System.Int64") idColumn.ColumnName = "CaseVersion" dtTable.Columns.Add(idColumn) I would like to get the datatype of the column during run time so that I can cast the data into the right data type. If I use Row(columnindex).GetType.FullName, it always returns System.DBNull, irregardless of the columnindex is. Can somebody guide me? Thanks. venki |
#3
| |||
| |||
|
|
Hello: I defined a datatable to have two columns: ' Add three column objects to the table. idColumn = New DataColumn() idColumn.DataType = System.Type.GetType("System.String") idColumn.ColumnName = "CaseId" dtTable.Columns.Add(idColumn) idColumn = New DataColumn() idColumn.DataType = System.Type.GetType("System.Int64") idColumn.ColumnName = "CaseVersion" dtTable.Columns.Add(idColumn) I would like to get the datatype of the column during run time so that I can cast the data into the right data type. If I use Row(columnindex).GetType.FullName, it always returns System.DBNull, irregardless of the columnindex is. Can somebody guide me? Thanks. venki |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |