ASP将Excel数据导入到SQLServer的实现代码(4)


sexn=1
end select
end function
function comtypem(str)
select case str
case "竹制品"
comtypem=0
case "竹机械"
comtypem=1
end select
end function
function getclassdname(str,tablename,lang)
If Not IsNumeric(id) Then Exit Function
set rs2=conn.execute ("select top 1 id from "& tablename &" where classname like '%"&str&"%'")
if not rs2.eof Then
If lang<>"" Then
If lang="cn" Then
getclassdname=getclassdname & rs2(0)
ElseIf lang="en" Then
getclassdname=getclassdname & rs2(0)
End If
End If
else
getclassdname=0
end if
rs2.close
End Function
%>
<table width="300" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
<tr>
<th bordercolor="#F1F3F8" bgcolor="#999999" class="t" scope="row"> </th>
</tr>
<tr>
<th class="t" scope="row">文件<% response.write (filenameshow) %>导入成功!</th>
</tr>
<tr>
<th class="t" scope="row"><a href="javascript:self.close()" class="t">关闭窗口</a></th>
</tr>
<tr>
<th class="t" scope="row"><a href="1122.asp" class="t">返回</a></th>
</tr>
</table>