日期:2014-05-17  浏览次数:20865 次

各位前辈帮忙看看我这段代码有错没有?是上传本地数据用的!数据库是ACCESS!谢了啊!
<!--include   file= "../../club/CONN.ASP "   -->
<!--#include   file= "../../club/inc/MD5.ASP "   -->
<!--#include   file= "../../member/db/cnmb.asp "   -->
<!--#include   file= "../../club/inc/CONN.ASP "   -->
<!--include   file= "../../club/chat/conn.asp "   -->
<%cnMbOpen%>
<%
dim   xxlsfile,lxlsfile,action,sfile,conn3,conn2
xxlsfile=request.Form( "backfile ")
lxlsfile=request.Form( "backfile2 ")
action=request.Form( "sj ")

if   action= "xsj "   then
sfile=Server.MapPath( "UploadFiles ")& "\ "&xxlsfile
else  
sfile=Server.MapPath( "UploadFiles2 ")& "\ "&lxlsfile
end   if
if   sfile= " "   then
response.Write( "出错了,情与程序设计人员联系! ")
else
'set   conn=CreateObject( "ADODB.Connection ")
'conn.Open   "Provider=Microsoft.Jet.OLEDB.4.0;Jet   OLEDB:Database   Password=;Data   Source=E:\我的工作目录\IIS\IIS主目录\member\db\fjkhg48ukfjgh84u7jhghfj.mdb "

'set   conn3=CreateObject( "ADODB.Connection ")
'conn3.Open   "Provider=Microsoft.Jet.OLEDB.4.0;Jet   OLEDB:Database   Password=;Data   Source=/club/Data/#DVBBS71.asp "

set   conn2=CreateObject( "ADODB.Connection ")
conn2.Open   "Provider=Microsoft.Jet.OLEDB.4.0;Jet   OLEDB:Database   Password=;Extended   properties=Excel   5.0;Data   Source= "&sfile

if   action= "xsj "   then
sql   =   "SELECT   *   FROM   [Sheet1$] "  
set   rs   =   conn2.execute(sql)
while   not   rs.eof
fkrq=left(rs(7),4)& "- "&mid(rs(7),5,2)& "- "&right(rs(7),2)
jzrq=left(rs(8),4)& "- "&mid(rs(8),5,2)& "- "&right(rs(8),2)

if   rs(3) <> " "then
pwd=rs(3)
else
pwd=0
end   if

sql1   =   "insert   into   member([uid],[username],[sex],[IDcard],[email],[ljxfje],[score],[fxrq],[sxrq],[psd],[add],[tel],[yzbm],[klx],[cs],[lpje])   values( ' "&   fixsql(rs(0))   & " ', ' "&   fixsql(rs(1))   & " ', ' "&   fixsql(rs(2))   & " ', ' "&   fixsql(rs(3))   & " ', ' "&   fixsql(rs(4))   & " ', ' "&   fixsql(rs(5))   & " ', ' "&   fixsql(rs(6))   & " ', ' "&   cdate(fixsql(fkrq))& " ', ' "&   cdate(fixsql(jzrq))   & " ', ' "&   fixsql(md5(pwd,16))   & " ', ' "&   fixsql(rs(9))   & " ', ' "&   fixsql(rs(10))   & " ', ' "&   fixsql(rs(11))   & " ', ' "&   fixsql(rs(12))   & " ', ' "&   fixsql(rs(13))   & " ', ' "&   fixsql(rs(14))   & " ') "
 
cnMb.execute(sql1)
 
if   rs(2)= "F "   then  
sex=1  
else  
sex=0  
end   if <