我的前臺代碼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 請問“上傳圖片”的存儲過程怎么寫!!!!要保存圖片到服務器指定的路徑里。
展開