Case "company" 'หน่วยงาน/บริษัท======================
response.Write("<table class='thaitext_body' cellpadding='0' cellspacing='1'>")
Response.Write "<tr bgcolor='#cccccc'>" & vbCrLf
For I = 0 To iCols - 1
Response.Write "<th align='center'>"
Response.Write rsCheckin.Fields.Item(I).Name
Response.Write "</th>" & vbCrLf
Next 'I
Response.Write "</tr>" & vbCrLf
j=0
Do While Not rsCheckin.EOF
j=j+1
company_id=trim(rsCheckin.Fields.Item(1).Value)
'if company_id="" then company_id=j+1
company_name=checkvaluestr(trim(rsCheckin.Fields.Item(2).Value))
address=checkvaluestr(trim(rsCheckin.Fields.Item(3).Value))
company_phone=checkvaluestr(trim(rsCheckin.Fields.Item(4).Value))
company_remark=checkvaluestr(trim(rsCheckin.Fields.Item(5).Value))
response.Write("<tr bgcolor='#dedede'>")
response.Write("<td>"&j&"</td>")
response.Write"<td>"&company_id&"</td><td>"&company_name&"</td><td>"&address&"</td><td>"&company_phone&"</td><td>"&company_remark&"</td>")
if ds_id<>"0" then
sql="INSERT INTO [company] ([company_id],[company_name],[Address],[company_phone],[company_remark]) VALUES("&company_id&",'"&company_name&"','"&Address&"','"&company_phone&"','"&company_remark&"')"
'response.Write("<br>รอบที่ : "&j&" : "&company_id&" : "&company_name)
'response.End()
if isnumeric(company_id) then
conn.execute(sql)
end if
end if
rsCheckin.MoveNext
response.Write("</tr>")
Loop
response.Write("</table>")