1.
string sql = string.Format("select top {0} * from Images where TId={1}",n,tid);
2.如果你的Tid是自增长的,
那么,最后的一条就是“select top 1 * from Images order by tid "
string sql = string.Format("select top {0} * from Images where TId={1}",n,tid);
2.如果你的Tid是自增长的,
那么,最后的一条就是“select top 1 * from Images order by tid "
http://expert.csdn.net/Expert/FAQ/FAQ_Index.asp?id=2227