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,027

HOME > ASP > ASP Forum > uploads ไม่ได้ เพราะติด MidB กรุณาช่วยด้วย Error Type: Microsoft VBScript runtime (0x800A0005) Invalid procedure call or argument: 'MidB'



 

uploads ไม่ได้ เพราะติด MidB กรุณาช่วยด้วย Error Type: Microsoft VBScript runtime (0x800A0005) Invalid procedure call or argument: 'MidB'

 



Topic : 005178

Guest




มีปัญหาคือ
ไม่สามารถ uploads ได้ติดตรงนี้คือ

Error Type:
Microsoft VBScript runtime (0x800A0005)
Invalid procedure call or argument: 'MidB'
/project/uploads.asp, line 18
[


**หน้าส่ง"addpic.asp"***

<%id=request.querystring("sqp_id")%>
<form action="addpic_uploads.asp" method="post">
<input type="hidden" name="id" value=<%=id%>>
<table><tr>
<td align=right><div align="left"><font color="#000000" size="2" face="MS Sans Serif, Tahoma, sans-serif">
<strong>&acirc;&raquo;&Atilde;&acute;&agrave;&Aring;&times;&Iacute;&iexcl;&auml;&iquest;&Aring;&igrave;&Atilde;&Ugrave;&raquo;:</strong></font></div></td>
<td><input type="file" name="blob" class=input_button2></td>
</tr>
<tr> <td><input type="submit" value="Upload" class=input_button2></td>
</tr></table>

--------------------------------------------------------------------------------------------------------------------------

**หน้ารับ"addpic_uploads.asp"***

<!-- #include file="uploads.asp"-->
<%
filename=uploaddata.Item("blob").Item("filename")
pos_filebegin=InStrRev(filename,"\")
pos_fileend=Len(filename)
filename_new=Mid(filename,pos_filebegin+1,pos_fileend-pos_filebegin)

Set fs=Server.CreateObject("Scripting.FileSystemObject")
Set uploadfile=fs.CreateTextFile(Server.Mappath("image"&"/"&filename_new))
uploadfile.Write uploaddata.Item("image").Item("value")
uploadfile.Close

id=request.form("id")
set rs=server.createobject("ADODB.recordset")
sql="select * from sq_file where sqp_id='"&id&"'"
rs.open sql,conn,3,3
rs("path_pic")=filename_new
rs.Update%>

--------------------------------------------------------------------------------------------------------------------------

**ตัว uploads"uploads.asp"**
<%
Function TextToBinary(text)
For i=1 to Len(text)
character=Mid(text,i,1)
TextToBinary=TextToBinary & ChrB(Asc(character))
Next
End Function
Function BinaryToText(Binary)
BinaryToText=""
For i=1 to LenB(Binary)
character=MidB(Binary,i,1)
BinaryToText=BinaryToText & Chr(AscB(character))
Next
End Function
Set uploaddata=CreateObject("Scripting.Dictionary")
data=Request.BinaryRead(Request.TotalBytes)
posend=InStrB(1,data,TextToBinary(Chr(13)))
header=MidB(data,1,posend-1)
endheader=header&TextToBinary("_")
pos_header=1
pos_endheader=InStrB(1,data,endheader)
Do While pos_header<>pos_endheader
Set sub_uploaddata=CreateObject("Scripting.Dictionary")
pos_name=InStrB(pos_header,data,TextToBinary("name="))
pos_namebegin=pos_name+6
pos_nameend=InStrB(pos_namebegin,data,TextToBinary(Chr(34)))
name=BinaryToText(MidB(data,pos_namebegin,pos_nameend-pos_namebegin))
pos_file=InStrB(pos_nameend,data,TextToBinary("filename="))
enddata=InStrB(pos_nameend,data,header)
If (pos_file<>0)And(pos_file<enddata) Then
pos_filebegin=pos_file+10
pos_fileend=InStrB(pos_filebegin,data,TextToBinary(Chr(34)))
filename=BinaryToText(MidB(data,pos_filebegin,pos_fileend-pos_filebegin))
sub_uploaddata.Add "filename",filename
pos_content=InStrB(pos_fileend,data,TextToBinary("Content-Type:"))
pos_contentbegin=pos_content+14
pos_contentend=InStrB(pos_contentbegin,data,TextToBinary(Chr(13)))
contenttype=BinaryToText(MidB(data,pos_contentbegin,pos_contentend-pos_contentbegin))
sub_uploaddata.Add "contenttype",contenttype
pos_valuebegin=pos_contentend+4
pos_valueend=InStrB(pos_valuebegin,data,header)-2
Value=BinaryToText(MidB(data,pos_valuebegin,pos_valueend-pos_valuebegin))
sub_uploaddata.Add "value",value
Else
pos_valuebegin=pos_nameend+4
pos_valueend=InStrB(pos_valuebegin,data,header)-2
Value=BinaryToText(MidB(data,pos_valuebegin,pos_valueend-pos_valuebegin))
sub_uploaddata.Add "value",value
End If
uploaddata.Add name,sub_uploaddata
pos_header=InStrB(pos_header+LenB(header),data,header)
Loop
%>




Tag : - - - -







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 20 ส.ค. 2548 11:44:33 By : mido View : 3674 Reply : 4
 

 

No. 1

Guest


ใช้ dundas ช่วย Upload
<%
set dundas = Server.createObject("Dundas.Upload.2")
dundas.UseUniqueNames=False
dundas.Save Server.MapPath("folder/")

For Each file In dundas.Files
'------กำหนด directory
NewFileName = "folder/" & dundas.GetFileName(file.Path)
next
Set file = dundas.Files("file")
%>
folder = folder ที่ต้องการ Upload ลงไป






Date : 21 ส.ค. 2548 16:45:33 By : visit
 


 

No. 2



โพสกระทู้ ( 96 )
บทความ ( 0 )



สถานะออฟไลน์


ลองใช้ dundus ก็ได้ครับ
หรือที่ผมเคยเจอนะครับ
ก็จะเป็นแบบนี้เหมือนกัน แต่ให้ลองเอาโค้ดตัวเดียวกัน ไป run บน win me หรือ 98 ด้วย pws จะสามารถผ่านได้ครับ

ปัญหาอาจเกิดจากที่ตัว iis หรือ windows เอง
Date : 22 ส.ค. 2548 07:38:47 By : gototon
 

 

No. 3



โพสกระทู้ ( 367 )
บทความ ( 0 )



สถานะออฟไลน์


แก้โดยใช้ multipart/form-data ครับ
Date : 2011-02-25 11:03:30 By : Joe_Dev
 


 

No. 4

Guest


ยังงงอยู่ดีครับ http://www.goosiam.com/news/
Date : 2013-03-04 18:52:02 By : klang
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : uploads ไม่ได้ เพราะติด MidB กรุณาช่วยด้วย Error Type: Microsoft VBScript runtime (0x800A0005) Invalid procedure call or argument: 'MidB'
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ 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 02
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 อัตราราคา คลิกที่นี่