Hi,
you can try
command.CommandText = "
SELECT TOP 1 rel.tnum
FROM (SELECT tnum, ROW_NUMBER() OVER(ORDER BY (SELECT 1)) AS row_nr FROM sendletter) AS rel ORDER BY rel.row_nr DESC";
, it will return you the last item in the sendletter table.
Initilly the ROW_NUMBER() will give a number for each ROW returned in the inner select (thus row_nr will be [1...n]). Then you can order it inversely and select the TOP 1, which will give you the last item. Hope this helps.
Regards