Loading ...
Sorry, an error occurred while loading the content.

Re: XSQLDA && error code = -804

Expand Messages
  • hvlad
    ... (1) here you say: the field parameter is nullable ... (2) here you must put sizeof(blob_id) ... and here you must supply NULL-indicator because of (1)
    Message 1 of 5 , May 13 2:01 AM
    • 0 Attachment
      --- In firebird-support@yahoogroups.com, "stoneoldrock" wrote:
      >
      > Hi, all
      >
      > I am coming into a XSQLDA problem, would anyone of you like to point out where is wrong in the following code?

      ...

      > in_sqlda->sqlvar[0].sqldata = (char *) &blob_id;
      > in_sqlda->sqlvar[0].sqltype = SQL_BLOB+1;

      (1) here you say: the field\parameter is nullable

      > in_sqlda->sqlvar[0].sqllen = strlen(blob_buffer);

      (2) here you must put sizeof(blob_id)

      > in_sqlda->sqlvar[0].sqlind = NULL;

      and here you must supply NULL-indicator because of (1)

      Regards,
      Vlad
    • stoneoldrock
      Hi, Vlad ... Now it is: int nullid = 0; // short nullid = -1; nullid = 1; // int *nullid = 0; in_sqlda- sqlvar[0].sqldata = (char*) &blob_id;
      Message 2 of 5 , May 14 5:52 AM
      • 0 Attachment
        Hi, Vlad

        as you have instructed:

        > > in_sqlda->sqlvar[0].sqldata = (char *) &blob_id;
        > > in_sqlda->sqlvar[0].sqltype = SQL_BLOB+1;
        >
        > (1) here you say: the field\parameter is nullable
        >
        > > in_sqlda->sqlvar[0].sqllen = strlen(blob_buffer);
        >
        > (2) here you must put sizeof(blob_id)
        >
        > > in_sqlda->sqlvar[0].sqlind = NULL;
        >
        > and here you must supply NULL-indicator because of (1)

        Now it is:

        int nullid = 0; // short nullid = -1; nullid = 1;
        // int *nullid = 0;
        in_sqlda->sqlvar[0].sqldata = (char*) &blob_id;
        in_sqlda->sqlvar[0].sqltype = SQL_BLOB+1;
        in_sqlda->sqlvar[0].sqllen = sizeof (blob_id);
        in_sqlda->sqlvar[0].sqlind = &nullid;

        There is now NO more error message, for the function hangs inside the isc_dsql_execute_immediate(..) call, and NEVER gets out...

        any further suggestions?

        yours
        o'rock
      • hvlad
        ... Sooner of all you have not committed concurrent update or delete of the same row. As your transaction have no TPB it used default parameters and wait s
        Message 3 of 5 , May 14 1:34 PM
        • 0 Attachment
          --- In firebird-support@yahoogroups.com, "stoneoldrock" wrote:
          ...
          > There is now NO more error message, for the function hangs inside the isc_dsql_execute_immediate(..) call, and NEVER gets out...
          >
          > any further suggestions?

          Sooner of all you have not committed concurrent update or delete of the
          same row. As your transaction have no TPB it used default parameters and
          wait's infinite for concurrent updates.

          Regards,
          Vlad
        • stoneoldrock
          Hi, Vlad ... Thank you so much that it works now! I simply committed the main UPDATE..transaction, and it works now either it is isc_tpb_wait or
          Message 4 of 5 , May 15 8:28 AM
          • 0 Attachment
            Hi, Vlad
            You instructed:

            > Sooner of all you have not committed concurrent update or delete of > the same row. As your transaction have no TPB it used default
            > parameters and wait's infinite for concurrent updates.

            Thank you so much that it works now! I simply committed the main UPDATE..transaction, and it works now either it is isc_tpb_wait or
            isc_tpb_nowait, for there is no transactions to wait at all.

            Of course this is only a testing function, it will load a file into the blob in the real world. A loop of isc_put_segment...

            So please do not feel much relaxed by now for if I come into some problems by then I will come back here again (to trouble you).

            Thanks again, Vlad
            yours
            o'rock
          Your message has been successfully submitted and would be delivered to recipients shortly.