Page 1 of 1

Stored Proc name conflict

Posted: Sun 27 Oct 2013 08:17
by coolsmurf
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,

Re: Stored Proc name conflict

Posted: Mon 28 Oct 2013 12:39
by AndreyZ
Hello,

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

Re: Stored Proc name conflict

Posted: Tue 29 Oct 2013 16:55
by coolsmurf
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.

Re: Stored Proc name conflict

Posted: Wed 30 Oct 2013 09:20
by AndreyZ
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.