Bug #23990 why a pair "{" "}" is appended to my SQL statement
Submitted: 5 Nov 2006 19:40 Modified: 30 May 2013 6:56
Reporter: Bruce YANG Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S1 (Critical)
Version:3.5.1and 5.05 OS:Windows (WINDOWNS SP2)
Assigned to: CPU Architecture:Any

[5 Nov 2006 19:40] Bruce YANG
Description:
ENV: 
BCB(6.0) + ADO + MyODBC(3.5.1/5.05) + MySQL(5.0) 

When I use a TADOStoredProc component to call storedprocedure of MySQL, I can see the real SQL statement MySQL server recieved has been embraced by "{" and "}" 
e.g. 
My SQL statement: "CALL sp_mysp" 
Actually the MySQL recieved: "{ CALL sp_mysp}" (I check the query log and the error message also says it is not a valid SQL statement). 

But I can use TADOQuery call the above procedure correctlly. 
Because TADOQuery can not get reture dataset, I have to use TADOStoredProc if I want the procedure retures a dataset. 

Would somebody help me to address the problem? Thanks in advance.

How to repeat:
use a TADOStoredProc component to call storedprocedure of MySQL

Suggested fix:
no idea:)
[8 Nov 2006 9:28] Tonci Grgin
Hi Bruce and thanks for your problem report.
I would like to know the *exact* version of MyODBC (3.51.x). You can check it by checking version of myodbc3.dll in windir\system32 folder.

As far as I know, MyODBC doesn't add "{}" braces around call but some tools do. We addressed this problem in 3.51.13 (not released yet) but from opposite side than what you would expect:
-- now handles statements embraced by {} (removes the braces)

So, it is my guess that Borland TADO... class adds the braces, not MyODBC which explains why MyODBC v5 doesn't work too. We will be releasing new version of 3.51 soon.
[9 Dec 2006 0:01] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[30 May 2013 6:56] Bogdan Degtyariov
I'm closing this bug because I can not continue without feedback from the reporter. If you have new info, please reopen the report.