Dim str_start : str_start = 5
Dim str_stop : str_stop = 10
strsql = "Select Departmentid,Corruption ,SectionID From Department where Departmentid like '%"&Request.Form("keyword")&"%'"
set rsObj = Server.CreateObject("ADODB.Recordset")
Obj.Open strsql, ConnDB, adOpenForWardOnly,AdLockReadOnly
If Not rsObj.EOF Then
arrRec = rsObj.getRows(,,Array("Departmentid", "Corruption", "SectionID"))
RecCount = Ubound(arrRec,2)+1
Else
RecCount = 0
End If
rsObj.close
Set rsObj = Nothing
for i=0 to ubound(arrRec,2)
Response.Write(arrRec(0, i))
next
If Rs.EOF Then
%>
<strong> ไม่มีข้อมูลในตาราง !</strong>
<%Else%>
</font>
<table width="608" height="48" border="1">
<tr bgcolor="Silver">
<td height="20"><div align="center"><strong><font size="1" face="MS Sans Serif, Tahoma, sans-serif">Departmentid</font></strong></div></td>
<td><div align="center"><strong><font size="1" face="MS Sans Serif, Tahoma, sans-serif">Corruption</font></strong></div></td>
<td><div align="center"><strong><font size="1" face="MS Sans Serif, Tahoma, sans-serif">SectionID</font></strong></div></td>
</tr>
<% While Not Rs.EOF%>
<tr>
<td><font size="2" face="MS Sans Serif, Tahoma, sans-serif"><%= Rs("Departmentid")%></font></td>
<td><font size="2" face="MS Sans Serif, Tahoma, sans-serif"><%= Rs("Corruption")%></font></td>
<td><font size="2" face="MS Sans Serif, Tahoma, sans-serif"><%= Rs("SectionID")%></font></td>
</tr>
<% Rs.MoveNext
Wend
Rs.Close
Conn.Close
End If
%>
</table>
<font size="2" face="MS Sans Serif, Tahoma, sans-serif">
<%
end if
%>
</font></div>
</body>
</html>