======程式流程圖====== ======Code====== <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <% option explicit %> <% '測試 Dim RSex,conn,RS,i,arrytmp,fieli set RSex=GetExcelRecordset("zzExcel.xls","select * from [custom2$]") set conn=CreateConn(request.QueryString("__Path")&"/db/news.mdb") 'set RS=rs_create("select * from custom_data",conn,"w") i=0 arrytmp=array("login","pwd","start_date","end_date","name","g51_id","sn","g52_id","pay_day","idno","man","boss","address","bill_address","tel","fax","phone","mail","g53_id","price","price_lg","price_bd","note","price_in_box","price_in_piece","price_in_lg","price_in_bd","price_out_box","price_out_piece","price_out_lg","price_out_bd","create_datetime","create_user","change_datetime","change_user","ss_date") do while not RSex.eof set RS=rs_create("select * from custom_data where custom_id="&RSex("custom_id")&"",conn,"w") if RS.EOF THEN RS.addnew i=i+1 for fieli=0 to Ubound(arrytmp) 'RS("custom_id")=RSex("custom_id") RS(arrytmp(fieli))=RSex(arrytmp(fieli)) 'RS("login")=RSex("login") 'RS("pwd")=RSex("pwd") 'RS("start_date")=RSex("start_date") 'RS("end_date")=RSex("end_date") next RS.update end if RS.close 'response.Write RSex("custom_id")&""&RSex("name")&""&RSex("idno")&"
" 'response.Write RS("custom_id")&""&RS("name")&""&RS("idno")&"
" RSex.movenext 'RS.movenext loop if i=0 then response.write "ERROR" else response.write "新增"&i&"筆" end if set RSex=nothing set RS=nothing ConnClose(conn) %>