Page 1 of 1

MySQL4: prepare still fails

Posted: Fri 27 Jan 2006 10:19
by Upscene
Hi there,

When calling the Prepare method on a "direct" connection and MySQL 4, the MyDAC component set now raises an error:
Prepare/UnPrepare is not supported by this MySQL server version

Well, great... But this is not what we agreed to, is it?

In Delphi code, a "prepare" can mean multiple things. It can get things ready for parameters - if supported - and create a server side "prepared statement".

If you're programming for MySQL 4, 4.1, 5 and 5.1, it would be very very nice to have a "prepare" NOT raise an error, but rather just ignore that it cannot do a server side prepared statement.

I thought that when you said you would be fixing this, we agreed that it would silently ignore MySQL 4.0 and just return to the caller...

:(

--
Martijn Tonies
Upscene Productions

Posted: Mon 30 Jan 2006 11:44
by Ikar
You have misunderstood our intentions.
We believe that ignoring user's explicit instructions to prepare a command is a bad idea. The best and only thing to do here is to inform user about the fact that server cannot perform required actions.
The functionality you require can easily be implemented by yourself, either in your own code or in MyDAC sources, which are available in Professional version.
Moreover, you probably spotted already lots of bugs with preparing on MySQL servers. We advise to avoid using Prepare method every now and then. It really saves time and adds reliability.

Posted: Tue 31 Jan 2006 11:03
by upscene
Indeed, I'm working around this now...
We advise to avoid using Prepare method every now and then. It really saves time and adds reliability.
?? shouldn't it be faster for actions like INSERTs that are executed thousands of times?

--
Martijn Tonies
Upscene Productions

Posted: Mon 06 Feb 2006 14:23
by Ikar
We intended to say that Prepare statement is useful only in certain situations. However, using it on every possible occasion leads to miscellaneous problems.