Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record
ใครรู้วิธีแก้ช่วยหน่อย
codeที่เขียนคือ
<%
dim keyword
dim kind
keyword=Request.QueryString("keyword")
kind=Request.QueryString("kind")
if keyword="" then
sql ="SELECT PartList.Function, PartList.MachineType, PartList.PID, Group.GroupName, SubGroup.SubGroupName, PartList.ArticleNo, PartList.PartDescription FROM SubGroup right JOIN ([Group] INNER JOIN PartList ON Group.GroupID=PartList.GroupID) ON SubGroup.SubGroupID=PartList.SubGroupID order by PartList.PID asc"
elseif kind="0" then
sql ="SELECT PartList.Function, PartList.MachineType, PartList.PID, Group.GroupName, SubGroup.SubGroupName, PartList.ArticleNo, PartList.PartDescription FROM SubGroup right JOIN ([Group] INNER JOIN PartList ON Group.GroupID=PartList.GroupID) ON SubGroup.SubGroupID=PartList.SubGroupID where PartList.ArticleNo like '"&keyword&"%'order by PartList.PID asc"
elseif kind="1" then
sql ="SELECT PartList.Function, PartList.MachineType, PartList.PID, Group.GroupName, SubGroup.SubGroupName, PartList.ArticleNo, PartList.PartDescription FROM SubGroup right JOIN ([Group] INNER JOIN PartList ON Group.GroupID=PartList.GroupID) ON SubGroup.SubGroupID=PartList.SubGroupID where Group.GroupName like '"&keyword&"%'order by PartList.PID asc"
elseif kind="2" then
sql ="SELECT PartList.Function, PartList.MachineType, PartList.PID, Group.GroupName, SubGroup.SubGroupName, PartList.ArticleNo, PartList.PartDescription FROM SubGroup right JOIN ([Group] INNER JOIN PartList ON Group.GroupID=PartList.GroupID) ON SubGroup.SubGroupID=PartList.SubGroupID where SubGroup.SubGroupName like '"&keyword&"%'order by PartList.PID asc"
elseif kind="3" then
sql ="SELECT PartList.Function, PartList.MachineType, PartList.PID, Group.GroupName, SubGroup.SubGroupName, PartList.ArticleNo, PartList.PartDescription FROM SubGroup right JOIN ([Group] INNER JOIN PartList ON Group.GroupID=PartList.GroupID) ON SubGroup.SubGroupID=PartList.SubGroupID where PartList.PartDescription like '"&keyword&"%'order by PartList.PID asc"
elseif kind="4" then
sql ="SELECT PartList.Function, PartList.MachineType, PartList.PID, Group.GroupName, SubGroup.SubGroupName, PartList.ArticleNo, PartList.PartDescription FROM SubGroup right JOIN ([Group] INNER JOIN PartList ON Group.GroupID=PartList.GroupID) ON SubGroup.SubGroupID=PartList.SubGroupID where PartList.Function like '"&keyword&"%'order by PartList.PID asc"
elseif kind="5" then
sql ="SELECT PartList.Function, PartList.MachineType, PartList.PID, Group.GroupName, SubGroup.SubGroupName, PartList.ArticleNo, PartList.PartDescription FROM SubGroup right JOIN ([Group] INNER JOIN PartList ON Group.GroupID=PartList.GroupID) ON SubGroup.SubGroupID=PartList.SubGroupID where PartList.MachineType like '"&keyword&"%'order by PartList.PID asc"