vb.net mysql存储图片_怎么让VB.NET 上传图片到SQL 数据库只保存路径,图片保存到文件...
我的前臺代碼dimCoonAsSqlClient.SqlConnectiondimRsAsNewSqlClient.SqlCommandRs.Connection=CoonRs=NewSqlClient.SqlCommand("上傳圖片",Coon)Rs.CommandType=CommandType.StoredPr...
我的前臺代碼 dim Coon As SqlClient.SqlConnection dim Rs As New SqlClient.SqlCommand Rs.Connection = Coon Rs = New SqlClient.SqlCommand("上傳圖片", Coon) Rs.CommandType = CommandType.StoredProcedure Rs.Parameters.Add("@bh", SqlDbType.VarChar, 20).Value = GroupBox1.Text Rs.Parameters.Add("@return", SqlDbType.Int).Direction = ParameterDirection.ReturnValue Dim bit As New Bitmap(Image.FromFile(ListBox1.Items(1))) Dim buffer As New IO.MemoryStream Dim bytes() As Byte = buffer.ToArray Rs.Parameters.Add("@tp", SqlDbType.Image).Value = bytes buffer.Close() buffer.Dispose() bit.Dispose() Rs.ExecuteNonQuery() If Rs.Parameters("@return").Value().ToString > "0" Then MsgBox("添加完成", 64, "添加") GroupBox1.Visible = False End If 請問“上傳圖片”的存儲過程怎么寫!!!!要保存圖片到服務器指定的路徑里。
展開
總結
以上是生活随笔為你收集整理的vb.net mysql存储图片_怎么让VB.NET 上传图片到SQL 数据库只保存路径,图片保存到文件...的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: unbuntu 启动任务脚本_Ubunt
- 下一篇: 康佳电视开机在广告页面死机了怎么恢复出厂