Function Update(ByVal RecId As Integer, ByVal Imge As Byte()) As Boolean
Dim Ret As Boolean = True
Using oCn As New OleDb.OleDbConnection(StrConnection)
Try
oCn.Open()
Using oCmd As New OleDb.OleDbCommand()
oCmd.Connection = oCn
oCmd.CommandText = "Update Questions Set QuestionImg = @Img Where QueId = " + RecId & ";"
oCmd.CommandType = CommandType.Text
oCmd.Parameters.Add(New OleDb.OleDbParameter("@Img", OleDb.OleDbType.Binary, 2147483647, ParameterDirection.Input, True, 0, 0, "", DataRowVersion.Proposed, IIf(IsNothing(Imge), DBNull.Value, Imge)))
oCmd.ExecuteNonQuery()
End Using
Catch ex As Exception
Throw New Exception("_TBIMAGE::Update::Error Occured.", ex)
Ret = False
End Try
End Using
Return Ret
End Function