看板 Web_Design 關於我們 聯絡資訊
我現在有一個完整的拍賣程式程式碼 但是在新增拍賣物那裡面,圖片上傳有問題 上傳的圖片進不了資料庫裡面 資料庫裡有圖片(設定成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