On Mon, 09 Dec 2013 14:12:44 +0400, Alex Peshkoff <[email protected]>
wrote:
> On 12/09/13 13:57, Mark Rotteveel wrote:
>> On Mon, 09 Dec 2013 12:50:50 +0400, Alex Peshkoff <[email protected]>
>> wrote:
>>> On 12/08/13 17:57, Mark Rotteveel wrote:
>>>> What is the meaning of the blob_id in the response to
op_open_blob(2)?
>>> Number of that object at the server site.
>> That is the object handle, which is a different entity from the blob id
>> in
>> the response message.
>
> Certainly different, but that is what returned to op_open_blob.
>
>> I am not talking about the object handle, but about the blob id.
>
> well...
>
>> So if I understand correctly in open_blob the blob id is not returned;
>> isn't that inconsistent as it is returned for create_blob?
>
> Mark, let's first of all understand what do we talk about.
>
> When you ask about 'the meaning of the blob_id in the response to
> op_open_blob' then there is only one thing which is called ID in c++
> fbclient - this is what you call handle.
>
> But let me now ask what you mean under 'create_blob' here? API function?
> Code of network operation? Something else? Upon this depends an answer.
I think it is safe to assume that I will almost always be talking from the
perspective of the wire protocol.
Both op_create_blob and op_open_blob respond with a p_resp, which is
defined as:
typedef struct p_resp
{
OBJCT p_resp_object; // Object id
SQUAD p_resp_blob_id; // Blob id
CSTRING p_resp_data; // Data
Firebird::DynamicStatusVector* p_resp_status_vector;
} P_RESP;
the p_resp_object is the handle id, while p_resp_blob_id is - in case of
create_blob - the id of the blob (which for example can then be used in an
insert or update statement). That doesn't seem to be the case for
open_blob. Now this may seem trivial as I already have the blob id because
I used it to open the blob, but the existing implementation in Jaybird (and
in the .NET provider) make some assumptions with regard to the blob id in
the response which are correct for op_create_blob(2), but seem to be wrong
for an op_open_blob(2).
Mark
------------------------------------------------------------------------------
Sponsored by Intel(R) XDK
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel