Beispiel #1
0
        public static int GetMaxID(string idFieldName, string tableName)
        {
            object obj = OleDAL.GetOneValue("select max(" + idFieldName + ") from " + tableName);

            if (obj != null && obj != DBNull.Value)
            {
                return((int)obj);
            }
            else
            {
                return(0);
            }
        }