3
我使用基於vb.net的窗口,我想要在我的SQL服務器中獲取或下載FileImage。在ASP.NET中,我可以通過此代碼下載它。但我想將它翻譯成基於Windows的。你能幫我嗎?從SQL Server下載圖片
感謝,
Dim oFileType As String = oPortal.GetDs("FileType")
Dim oFile As Byte() = oPortal.GetDs("FileImage")
Dim oRecordKey As String = oPortal.GetDs("FileName")
Response.ContentType = "image/" & oFileType
If Request.QueryString("open") <> "" Then
Response.AppendHeader("Content-Disposition", "attachment; filename=" & oRecordKey)
End If
Response.BinaryWrite(oFile)
Response.End()
明白了。 File.WriteAllBytes(oPath&oFileName,WebCtrl.GetDs(「FileImage」)) – 2013-04-25 06:09:30
您可以添加它作爲答案並接受它嗎? – 2013-05-03 20:35:16