Set Rsb=Conn.Execute("Select top 1 TN From KS_Class Where ID='" & FCls.RefreshFolderID & "'")
If Not Rsb.EOF Then tParentID=Rsb(0) Else tParentID=FCls.RefreshFolderID
if tparentid="0" then tparentid=FCls.RefreshFolderID
Rsb.close:Set Rsb=Nothing
SqlStr = "Select " & FieldStr & " From KS_Class A Inner Join KS_Channel B On A.ChannelID=B.ChannelID Where B.ChannelStatus=1 And TN='" & tParentID & "' And TopFlag=1 and DelTF=0 Order BY root,FolderOrder"