-
updating blob
updating blob Posted on: January 03 2003 11:12 GMT -08:00
Code:
I'm using this code to insert a blob into my Oracle db, it works fine. The problem I'm having is when I try to update an existing blob. The update looks good when I run the app. I don't get any errors, but when I go to open my blob (.pdf) it has a size of 0 bytes and the .pdf doesn't open. Does anyone know how to update an existing blob field?
Dim sqlCmd As String = "insert into pbss.pbss_bid (bid_id, bid_type_code,buyer_name, bid_document, post_to_internet_ind) "
sqlCmd = sqlCmd & "values (?,?,?,?,?)"
Dim objCommand As New OleDbCommand(sqlCmd, objConnection)
objCommand.Parameters.Add("@bid_id", System.Data.OleDb.OleDbType.VarChar, 5).Value = txtBidId.Text
objCommand.Parameters.Add("@bid_type_code", System.Data.OleDb.OleDbType.Numeric, 2).Value = Bid_Type
objCommand.Parameters.Add("@buyer_name", System.Data.OleDb.OleDbType.VarChar, 45).Value = txtBuyerName.Text
objCommand.Parameters.Add("@bid_document", System.Data.OleDb.OleDbType.Binary, 27086).Value = FileByteArray
objCommand.Parameters.Add("@post_to_internet_ind", System.Data.OleDb.OleDbType.Integer).Value = Post_to_Int
objConnection.Open()
objCommand.ExecuteNonQuery()