[問題] asp.net的上傳圖片程式

看板Web_Design作者 (喔,脣膏!)時間18年前 (2005/12/29 19:50), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
我現在有一個完整的拍賣程式程式碼 但是在新增拍賣物那裡面,圖片上傳有問題 上傳的圖片進不了資料庫裡面 資料庫裡有圖片(設定成OLE物件)還有圖片大小 誰可以幫我看一下要怎樣把上傳的圖片存到資料庫裡 上傳圖片程式如下 Dim nFileLen as Integer Dim myData() as Byte If Not (MyFile.PostedFile Is Nothing) Then nFileLen = MyFile.PostedFile.ContentLength If nFileLen >0 Then ReDim myData(nFileLen) MyFile.PostedFile.InputStream.Read(myData, 0, nFileLen) dbRow("圖片") = myData dbRow("圖片大小") = nFileLen End If Else dbRow("圖片大小") = 0 End if DT.Rows.Add(dbRow) dbAdapt.Update(DS ,"拍賣物") objConn.Close() -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.129.37.110
文章代碼(AID): #13iys9o- (Web_Design)