Code :
<%
if keyword="" then
Response.write("<font class=font-family><br>¡ÃسҡÃÍ¡ Keyword à¾×èͤé¹ËÒ¨Ò¡ Field Description</font><hr>")
else
pageLen = 10 '¡Ó˹´¨Ó¹Ç¹áµèÅÐ˹éÒ·Õèµéͧ¡ÒÃáÊ´§¡Õè Reccord
pageNo = request.QueryString("pageNo")
if pageNo="" then pageNo = 1
Set Conn=Server.Createobject("ADODB.Connection")
Conn.Open "mb2","",""
'Conn.Open "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("db/product.mdb"),"" , ""
'ËÃ×ͨÐãªéà»ç¹ Conn.Open "product","",""
sql ="Select * From Date_VIN where Chassis like '%"&keyword&"%' or date like '%"&keyword&"%'"
'Set Rs = Conn.Execute(sql)
Set RS =Server.CreateObject("ADODB.Recordset")
RS.open Sql,Conn,1,3
Nrecord=RS.recordcount
Rs.pageSize = pageLen
totalPage = Rs.PageCount
Rs.absolutePage = pageNo
If Rs.EOF Then
%>
äÁèÁÕ¢éÍÁÙÅã¹µÒÃÒ§ !
<%Else%>
<%
if keyword="" then
Response.write("<font class=font-family><br>¡ÃسҡÃÍ¡ Keyword à¾×èͤé¹ËÒ¨Ò¡ Field Description</font><hr>")
else
pageLen = 10
pageNo = request.QueryString("pageNo")
if pageNo="" then pageNo = 1
Set Conn=Server.Createobject("ADODB.Connection")
Conn.Open "mb2","",""
'Conn.Open "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("db/product.mdb"),"" , ""
'ËÃ×ͨÐãªéà»ç¹ Conn.Open "product","",""
sql ="Select * From Date_VIN where Chassis like '%"&keyword&"%' or date like '%"&keyword&"%'"
'Set Rs = Conn.Execute(sql)
Set RS =Server.CreateObject("ADODB.Recordset")
RS.open Sql,Conn,1,3
If Rs.EOF Then
%>
äÁèÁÕ¢éÍÁÙÅã¹µÒÃÒ§ ! ไม่พบข้อมูล
<%
Else
Nrecord=RS.recordcount
Rs.pageSize = pageLen
totalPage = Rs.PageCount
Rs.absolutePage = pageNo
%>
<%
numSearch=1
Do while not rs.eof and numSearch <= pageLen
%>
พบข้อมูล
<%
numSearch=numSearch +1
RS.movenext
Loop
RS.close
Conn.close
%>