| 2603 | |
| 2604 | |
| 2605 | int API_ROUTINE BLOB_edit(ISC_QUAD* blob_id, |
| 2606 | FB_API_HANDLE database, |
| 2607 | FB_API_HANDLE transaction, |
| 2608 | const SCHAR* field_name) |
| 2609 | { |
| 2610 | /************************************** |
| 2611 | * |
| 2612 | * B L O B _ e d i t |
| 2613 | * |
| 2614 | ************************************** |
| 2615 | * |
| 2616 | * Functional description |
| 2617 | * Open a blob, dump it to a file, allow the user to edit the |
| 2618 | * window, and dump the data back into a blob. If the user |
| 2619 | * bails out, return FALSE, otherwise return TRUE. |
| 2620 | * |
| 2621 | **************************************/ |
| 2622 | |
| 2623 | LocalStatus st; |
| 2624 | CheckStatusWrapper statusWrapper(&st); |
| 2625 | |
| 2626 | RefPtr<IAttachment> att(REF_NO_INCR, handleToIAttachment(&statusWrapper, &database)); |
| 2627 | if (st.getState() & Firebird::IStatus::STATE_ERRORS) |
| 2628 | return FB_FAILURE; |
| 2629 | RefPtr<ITransaction> tra(REF_NO_INCR, handleToITransaction(&statusWrapper, &transaction)); |
| 2630 | if (st.getState() & Firebird::IStatus::STATE_ERRORS) |
| 2631 | return FB_FAILURE; |
| 2632 | |
| 2633 | int rc = FB_SUCCESS; |
| 2634 | |
| 2635 | try |
| 2636 | { |
| 2637 | rc = edit(&statusWrapper, blob_id, att, tra, TRUE, field_name) ? FB_SUCCESS : FB_FAILURE; |
| 2638 | } |
| 2639 | catch (const Exception& ex) |
| 2640 | { |
| 2641 | ex.stuffException(&statusWrapper); |
| 2642 | } |
| 2643 | |
| 2644 | if (statusWrapper.getState() & Firebird::IStatus::STATE_ERRORS) |
| 2645 | isc_print_status(statusWrapper.getErrors()); |
| 2646 | |
| 2647 | return rc; |
| 2648 | } |
| 2649 | |
| 2650 | |
| 2651 | int API_ROUTINE BLOB_get(FB_BLOB_STREAM blobStream) |
nothing calls this directly
no test coverage detected