> For Each loTable In toDataSet.Tables > For Each loRow In loTable.Rows > For Each loColumn In loTable.Columns > If IsDBNull(loRow.Item(loColumn.ColumnName)) Then > Select Case loColumn.DataType.ToString > Case "System.DateTime" > loRow.Item(loColumn.ColumnName) = ldDate >>
Select Case loColumn.DataType.ToString Case "System.Fieldtype" loRow.Item(loColumn.ColumnName) = Fieldtype.DefaultI have no idea how costly that case is - but I'd try to factor out identifying the default from the inner loop and use a caching approach.
For Each loTable In toDataSet.Tables loRow = loTable.Row[0] lnStop = loRow.Columns.Count-1 For lnFld = 0 to lnStop /// save the default for that field no. to the best caching structure /// in vfp it would just be an array, as each field can have its own data type next For Each loRow In loTable.Rows For lnFld = 0 to lnStop /// Check and replace if necessary next next nextFourthly, isn't there an isNull() method on the rows and/or column object ?