Esempio n. 1
0
 private static Type GetColumnType(DBHelper dbh, SqlCommand cmd, string tableName, string columnName)
 {
     cmd.CommandText = string.Format(CultureInfo.InvariantCulture, "SELECT [{0}] FROM [{1}]", columnName, tableName);
     DataTable dt = dbh.RunCmdDataTable(cmd);
     return dt.Columns[columnName].DataType;
 }