Try this dtTable.Columns(ColumnIndex).DataType.Name -- Thanks Shyam "vvenk" wrote: > 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