G
Guest
Hello:
I created a datatable with 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)
During run-time, I want to get the data type of each column so that I can
cast the data to the right datatype.
But when I investigate using Row(ColumnIndex).GetType.FullName, I alway get
"System.DBNull" irregardless of what column it is.
Can somebody guide me?
Thanks.
Venki
ps: I initially postedt this message under a different discusson group by
mistake. I apologize for double-posting.
I created a datatable with 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)
During run-time, I want to get the data type of each column so that I can
cast the data to the right datatype.
But when I investigate using Row(ColumnIndex).GetType.FullName, I alway get
"System.DBNull" irregardless of what column it is.
Can somebody guide me?
Thanks.
Venki
ps: I initially postedt this message under a different discusson group by
mistake. I apologize for double-posting.