Stored Proc name conflict

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for MySQL in Delphi and C++Builder
Post Reply
coolsmurf
Posts: 5
Joined: Tue 20 Nov 2012 18:54

Stored Proc name conflict

Post by coolsmurf » Sun 27 Oct 2013 08:17

Hi,

I have been using dbExpress with pleasure for a year now. However, there is one problem that bothers me. I have a MySQL database with two different schema, say "db_prod" and "db_test". One is the test database, the other one for production. However, if both schema contain a stored procedure that has the same name, then there seems to be some kind of conflict and dbExpress gets mixed up in the number of parameters.

I give an example of such a simple stored procedure. It is important that both schema contain the same procedure with the same name :

Code: Select all

CREATE PROCEDURE `GetNumber`(OUT `myNumber` INT)
BEGIN
SET myNumber = 3;
END
And I create a TSQLStoredProc object in my code :

Code: Select all

// myConnection is a TSQLConnection object connected to 'db_test'
TSQLStoredProc* sp = new TSQLStoredProc(myConnection);
sp->SQLConnection = myConnection;
sp->StoredProcName = "GetNumber";
sp->ExecProc();
The last line fires an exception at runtime :
TDBXError : Incorrect number of arguments for PROCEDURE GetNumber ; expected 1 got 2;
Has anyone seen this before ? Or is this a MySQL bug ?

Thanks in advance,

AndreyZ

Re: Stored Proc name conflict

Post by AndreyZ » Mon 28 Oct 2013 12:39

Hello,

I cannot reproduce the problem. Please specify the following:
- the exact version of your IDE.
- the exact version of dbExpress driver for MySQL.

coolsmurf
Posts: 5
Joined: Tue 20 Nov 2012 18:54

Re: Stored Proc name conflict

Post by coolsmurf » Tue 29 Oct 2013 16:55

I am using Embarcadero® C++ Builder XE3 (Version 17.0.4770.56661), Enterprise Edition, and thus dbExpress was included in this edition.

The dbExpress driver dbxmys.dll is in version 17.0 also, and libmysql.dll is in version 5.1.

I am connecting to a MySQL 5.5 database.

AndreyZ

Re: Stored Proc name conflict

Post by AndreyZ » Wed 30 Oct 2013 09:20

dbxmys.dll is a standard dbExpress driver for MySQL that is supplied with RAD Studio, it is not our driver.
Our dbExpress driver for MySQL is not supplied with RAD Studio, it is not the standard driver. You should write about this problem to the Embarcadero support.

Post Reply