Problems with PREPARE

  • Nobody/Anonymous

    Is Direct Sql able to cope with PREPAREd statements? I tried to send a query with

    SELECT 'select 123.456' INTO @ST;
    PREPARE stmt FROM @ST;
    EXECUTE stmt;

      which should return 123.456.
    Unfortunately nothing seems returned. Further the multi result capability of the interface seems to get a stop, after it (previous SELECTs return theis result, next results are not returned).

    Is there anything I can do as a workaround?
           maurizio nardò

    • Cristian Nicola

      Cristian Nicola - 2006-09-25

      I will investigate it further tonight, but at the moment i'm unable to execute these queries - i get an sql error on the second line. (without using direct mysql - server version 5.0.15).

      Kind regards,

    • Nobody/Anonymous

      Reading the "MySql Internals" document available at the MySql site, unfortunately it seems that the PREPARE statement runs with its own type COM_PREPARE packet, different from the COM_QUERY command packet.
      I can only suppose that this requires a dedicated method in the library, at the moment missing. Any possibility to implement it?
      Best regards

          maurizio nardò


Log in to post a comment.