Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,030

HOME > ASP > ASP Forum > ช่วยด้วยค่ะ ไฟล์แรกค่ะ เป็นฟอมร์รับค่ะ iWrong selection : Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. 1 file(s) uploaded.



 

ช่วยด้วยค่ะ ไฟล์แรกค่ะ เป็นฟอมร์รับค่ะ iWrong selection : Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. 1 file(s) uploaded.

 



Topic : 013440

Guest




------------------------ไฟล์แรกค่ะ เป็นฟอมร์รับค่ะ index33

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Smart Upload</TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<%

fid = Request.QueryString("fid")
act = Request.QueryString("act")
if act = "" Then act = "file"

If CStr(act) = CStr("file") Then
formaction = "upfile_s.asp"
piccolor = "#666666"
filecolor = "#FF0000"
End If

filecount = Request.QueryString("filecount")
If filecount = "" Then filecount = 0
If CInt(filecount) < CInt(1) or CInt(filecount) > CInt(5) Then filecount = 1

%>
<link href="include/default_style.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="include/default_javascript.js" type="text/javascript"></script>
</head>
</HEAD>


<BODY>
<H1>aspSmartUpload : Sample 1</H1>
<HR>

<FORM METHOD="POST" ACTION="upload11.asp" ENCTYPE="multipart/form-data">
<INPUT TYPE="FILE" NAME="FILE1" SIZE="50"><BR>
<INPUT TYPE="FILE" NAME="FILE2" SIZE="50"><BR>
<INPUT TYPE="FILE" NAME="FILE3" SIZE="50"><BR>
<INPUT TYPE="FILE" NAME="FILE4" SIZE="50"><BR>
<INPUT TYPE="SUBMIT" VALUE="Upload">

<td valign="top">
<p><% If CStr(act) = CStr("file") Then%><br><font size="2" face="Tahoma" color="#A50203"><b>File
Description : </b></font><br><textarea name="filedesc" rows="4" cols="35" style="border-width:1pt; border-color:rgb(204,204,204); border-style:solid;"></textarea><br><% End If%><font size="2" face="Tahoma" color="#A50203"><b><br>File
Count <select name="filecount" size="1" onchange="selfilecount(document.frmupload.filecount.value);">
<option value="1" selected>1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select><br></b></font><% If CStr(act) = CStr("file") Then%><br><font size="1" face="Tahoma" color="#666666"><b>Allow
File Type</b> : rar , zip<br><b>Allow File Size</b> &nbsp;&nbsp;: Maximum</font><font size="2" face="Tahoma" color="#666666"><b> 50
</b></font><font size="1" face="Tahoma" color="#666666">mb</font><% End If%><font size="2" face="Tahoma" color="#A50203"><b><br></b></font>


</FORM>



</BODY>
</HTML>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ไฟล์ upload11
<html>

<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title></title>

<!--#include file="include/functions_hash1way.asp" -->
</head>

<body text="black" link="blue" vlink="purple" alink="red" leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" background="images/bg-jens.jpg">

<table cellpadding="0" cellspacing="0" width="1000" align="center">
<tr>
<td width="200">
<p>&nbsp;</p>
</td>

</tr>
</table>

<p align="center">&nbsp;</p>
<table align="center" cellpadding="0" cellspacing="0" width="400" style="border-width:1pt; border-color:white; border-style:solid;">
<tr>
<td>
<p><br>
<%

On Error Resume Next

' Variables
' *********
Dim mySmartUpload
Dim intCount

' Object creation
' ***************
Set mySmartUpload = Server.CreateObject("aspSmartUpload.SmartUpload")

' Only allow txt or htm files
' ***************************
mySmartUpload.AllowedFilesList = "rar,zip"

' DeniedFilesList can also be used :
' Allow all files except exe, bat and asp
' ***************************************
' mySmartUpload.DeniedFilesList = "exe,bat,asp"

' Deny physical path
' *******************
mySmartUpload.DenyPhysicalPath = True

' Only allow files smaller than 50000 bytes
' *****************************************
mySmartUpload.MaxFileSize = 5242880

' Deny upload if the total fila size is greater than 200000 bytes
' ***************************************************************
mySmartUpload.TotalMaxFileSize = 5242880

' Upload
' ******
mySmartUpload.Upload

' Save the files with their original names in a virtual path of the web server
' ****************************************************************************

filedesc = mySmartUpload.form("filedesc")

userip = Request.ServerVariables("Remote_ADDR")
userip = Replace(userip,".","")
foldername = userip & day(now) & month(now) & year(now) & hour(now) & minute(now) & second(now)

set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.CreateFolder (Server.Mappath("upfile/"& foldername))
set f=nothing
set fs=nothing


strconn = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("db/upload.mdb")
set conn = server.createobject("adodb.connection")
conn.open strconn

Set rs=Server.CreateObject("ADODB.Recordset")
Sql="Select * From upload"

rs.Open Sql,Conn,1,3



For each file In mySmartUpload.Files
' Only if the file exist
' **********************
If not file.IsMissing Then
' Save the files with his original names in a virtual path of the web server
' ****************************************************************************
file.SaveAs("upfile/" & foldername &"/" & file.FileName)


rs.AddNew
ID = rs("ID")
fid = hashencode(ID)
rs("fid") = fid
rs("filename") = file.FileName
rs("filedesc") = filedesc
rs("update") = date
rs("uptime") = time

rs.Update

%>
<table cellpadding="0" cellspacing="0" width="400">
<tr><td width="400"><p align="left">&nbsp;</p></td></tr>
<tr><td width="400"><p>
<font size="2" face="Tahoma" color="#A50203"><b><%=file.FileName%></b></font><font size="2" face="Tahoma"><b> Download URL : </b><br>http://localhost/getfiles.asp?fn=<%=foldername%>&amp;fid=<%=fid%></font>
</p></td></tr>
<tr><td width="400"><p>&nbsp;</p></td></tr>
</table>

<%

' Display the properties of the current file
' ******************************************
'Response.Write("Name = " & file.Name & "<BR>")
'Response.Write("Size = " & file.Size & "<BR>")
'Response.Write("FileName = " & file.FileName & "<BR>")
'Response.Write("FileExt = " & file.FileExt & "<BR>")
'Response.Write("FilePathName = " & file.FilePathName & "<BR>")
'Response.Write("ContentType = " & file.ContentType & "<BR>")
'Response.Write("ContentDisp = " & file.ContentDisp & "<BR>")
'Response.Write("TypeMIME = " & file.TypeMIME & "<BR>")
'Response.Write("SubTypeMIME = " & file.SubTypeMIME & "<BR>")
intCount = intCount + 1
End If
Next


rs.Close

Set rs = Nothing
conn.close
Set Conn = Nothing

' Trap errors
' ***********
If Err Then
Response.Write("<center><b><font face='Tahoma' size='3' color='red'>Wrong selection : " & Err.description & "</font></b></center>")
Else

' Display the number of files uploaded
' ************************************
Response.Write("<center><b><font face='Tahoma' size='3'>" & intCount & " file(s) uploaded.</font></b></center>")
End If
Response.Write(intCount & " file(s) uploaded.")
%>
<font face='ms Sans serif' size=-1>
Upload path :<%=filePath%><br>
file name : </b><%=filename%><br>
???????? : <%=detail%>
<p align="center"><font size="2" face="Tahoma"><b><a href="index13.asp?act=file">Upload
more file</a><br><br></b></font></p>

</td>
</tr>
</table>


</td>
</tr>
</table>

</body>

</html>
------------------------------------------------------------------------------------------------------------------------------------------------------------
ไฟล์ getfiles
<html>
<head>
<title>giggle</title>

<%
fid = Request.QueryString("fid")
foldername = Request.QueryString("fn")

hcd = Request.QueryString("hcd")
hdl = Request.QueryString("hdl")



' Get file information from db

strconn ="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("db/upload.mdb")
set conn = server.createobject("adodb.connection")
conn.open strconn

Set rs=Server.CreateObject("ADODB.Recordset")
Sql="Select * From upload"

rs.Open Sql,Conn,1,3

fl = 0
While Not rs.EOF and fl = 0
If CStr(rs("fid")) = CStr(fid) Then
filename = rs("filename")
filedesc = rs("filedesc")

If CInt(hcd) = CInt(0) Then rs("dlcount") = CLng(rs("dlcount")+1)
dlcount = rs("dlcount")

rs.Update

fl = 1
End If
rs.MoveNext
Wend

rs.Close

Set rs = Nothing
conn.close
Set Conn = Nothing

%>
<% If CInt(hcd) = CInt(0) Then %>
<Script LANGUAGE="JavaScript">

<!-- Begin
var start=new Date();
start=Date.parse(start)/1000;
var counts=10;
function CountDown(){
var now=new Date();
now=Date.parse(now)/1000;
var x=parseInt(counts-(now-start),10);
if(document.form1){document.form1.clock.value = x;}
if(x>0){
timerID=setTimeout("CountDown()", 100)
}else{
document.form1.btndownload.disabled=false;
}
}

// End -->


</script>
<Script LANGUAGE="JavaScript">
<!--
window.setTimeout('CountDown()',100);
-->
</script>
<% End If %>

<Script language="javascript">
function godl()
{
document.form1.btndownload.disabled = true;
location.href="upfile/<%=foldername%>/<%=filename%>";
}
</script>
</head>
<hr width="80%" color="#F2F2F2">
<p align="center"><font size="2" face="Tahoma"><b><a href="index13.asp">Upload
File<br></a></b></font></p>
<hr width="80%" color="#F2F2F2"> <table align="center" cellpadding="0" cellspacing="0" width="400" style="border-width:1pt; border-color:white; border-style:solid;">
<tr>
<td>
<p><font size="2" face="Tahoma" color="#960001"><b>Filename :<br></b></font></p></td>
</tr>
<tr>
<td>
<p><font size="2" face="Tahoma"><%=filename%><br>&nbsp;</font></p></td>
</tr>
<tr><td>
<p><font size="2" face="Tahoma" color="#960001"><b>Description :</b></font></p></td>
</tr>
<tr>
<td>
<p><font size="2" face="Tahoma"><%=filedesc%><br>&nbsp;</font> </p></td>
</tr>
<tr>
<td>
<p><font size="2" face="Tahoma" color="#960001"><b>Total
Download : </b></font><font size="2" face="Tahoma"><%=dlcount%></font></p></td></tr><tr> <td>
<p>&nbsp;</p>
</td></tr> <tr>
<td>
<FORM NAME="form1">
<p align="center"><font size="2">Please
wait for
<INPUT TYPE="text" NAME="clock" SIZE="2" VALUE="10">
seconds.<br>
<br>
</font>
<input type="button" name="btndownload" value="Download File" onclick="godl();" disabled>
<font size="2">&nbsp;</font>
</FORM>


</td></tr><tr><td>
-------------------------------------------------------------------------------------------------------------------------------------------------------------------

พอคลิกอัพโหลดมันก็ขึ้น


Exp075.rar Download URL :
http://localhost/getfiles.asp?fn=1270011520072648&fid=0000000000000000000000000000000000000000





Wrong selection : Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
1 file(s) uploaded. Upload path :
file name :
???????? :


งงงงงงงมากแล้วค่ะแก้แล้วต้องรีบส่งค่ะ ใครช่วยได้ช่วยหน่อยน่ะค่ะ
เราเก็บไฟล์ทังหมดอยู่ใน D:\interpub\wwwroot\
upload.mdb เป็นฐานข้อมูล มันมีปัญหาตรงไหนค่ะมันถึงไม่เจอไฟล์ที่อัพค่ะ



Tag : - - - -







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 1 พ.ค. 2550 02:11:18 By : แมว View : 1908 Reply : 1
 

 

No. 1

Guest


Code (ASP)
IF Rs.EOF Then
  Response.write ("Not Found")
Else

End iF







Date : 2011-08-05 22:53:06 By : thaicreate
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : ช่วยด้วยค่ะ ไฟล์แรกค่ะ เป็นฟอมร์รับค่ะ iWrong selection : Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. 1 file(s) uploaded.
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 00
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่