国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
asp代碼實(shí)現(xiàn)EXCEL數(shù)據(jù)導(dǎo)入到SQL數(shù)據(jù)庫(kù)
 
<html>
<head>
<title>上傳文件</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/css.css" rel="stylesheet" type="text/css" />
</head>
<script>
if (top.location==self.location)
{
    top.location="index.asp"
}
</script>
<body leftmargin="0" topmargin="0">
<table width="100%" border=0 cellspacing=0 cellpadding=0>
<form name="form" method="post" action="readxls.asp" enctype="multipart/form-data">
    <tr>
          <td>
   <input name="file1" type=file class=input-text size="30">
  <input type=submit name="submit" value="導(dǎo)入數(shù)據(jù)" style="width:70px; height:19px;" >
         </td>
   </tr>
</form>
</table>
</body>
</html>
--------------------------------------
-------上傳并且寫入庫(kù)-----------
readxls.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="upload_5xsoft.inc"-->
<!--#include file="common/db_conn.asp"--> 
<html xmlns="<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>EXECL數(shù)據(jù)導(dǎo)入</title>
<style type="text/css">
<!--
body,td,th {
 font-size: 12px;
 color: #666666;
}
-->
</style>
</head>
<body>
<%
session.CodePage=936
Server.ScriptTimeOut=600000
set upload=new upload_5xsoft
set file=upload.file("file1")
if file.fileSize>120000 then
%>
<script>
alert("您選擇的文件過大!");
window.close();
</script>
<% end if
if file.fileSize>0 then
    filename=year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)
    filename=filename+"."
    filenameend=file.filename
    filenameend=split(filenameend,".")
    if filenameend(1)="xls" then
        filename=filename&filenameend(1)
        file.saveAs Server.mappath("uploadfile/"&filename)
    else
        response.write "數(shù)據(jù)格式不對(duì)!"
        response.write "<a href=upload.asp>返回</a>"
  response.end()
    end if
    set file=nothing
else
        response.write "文件不能為空!"
        response.write "<a href=upload.asp>返回</a>"
  response.end()
End if
set upload=nothing
'上傳XLS文件結(jié)束,下面從上傳的XLS文件中讀取數(shù)據(jù)寫入到SQL數(shù)據(jù)庫(kù)
   strAddr=server.MapPath("uploadfile/"&filename)
   set excelconn=server.createobject("adodb.connection")
   excelconn.open "Provider = Microsoft.Jet.OLEDB.4.0 ; Data Source = "+strAddr+";Extended Properties='Excel 8.0;HDR=NO;IMEX=1'"
 set rs=server.CreateObject("adodb.recordset")
 set rs1=server.CreateObject("adodb.recordset")
 sql="select * from [Sheet1$]"
 rs.open sql,excelconn,1,1
 if not(rs.bof and rs.eof) then
  rs.movenext
  do while not rs.eof
    sql1="select * from [Fees_Asse_T] where id is null"
    rs1.open sql1,conn,1,3
    rs1.addnew
       rs1("Cate_Code")=rs(0)
       rs1("Asse_Code")=rs(1)
       rs1("Asse_Name")=rs(2)
       rs1("Categories")=rs(3)
   rs1.update
   rs1.close
   rs.movenext
  loop
 end if
 rs.close() 
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
用ASP上傳Excel 表格并導(dǎo)入到數(shù)據(jù)庫(kù)
asp生成EXCEL文件的函數(shù)
vb編程把數(shù)據(jù)庫(kù)導(dǎo)出為excel
WinForm開發(fā)中,將Excel文件導(dǎo)入到DataGridView中時(shí),獲取Excel中所有表格的名稱。 .
用ASP將數(shù)據(jù)庫(kù)中的數(shù)據(jù)直接導(dǎo)出到EXCEL表中
ASP在線統(tǒng)計(jì)代碼
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服