MyDAC 5.70.0.42 Master / Detail Bug
Posted: Wed 10 Dec 2008 16:25
Hi,
I have found a bug when working with Master / Details :
On the Detail Query fill :
SQL with this script :
Set the master and details keys to 'Field'
Set the keyfields to 'Field'
Set Debug to true
Double click on the query and in the SQL Editor select 'Data Editor...'
The debug output will show this :
You can see that the is wrong : a ')' is added instead the 'Where' keyword.
If I remove the 'where' located in the 'SET' statement, the query will be correctly changed and executed by MyDAC.
This is a simple exemple, in my case, I have about 20 parameters in my 'SET' statement...
I have found a bug when working with Master / Details :
On the Detail Query fill :
SQL with this script :
Code: Select all
SET @MyVAR = (SELECT Field FROM Table WHERE Field = :Field) ;
DROP TEMPORARY TABLE IF EXISTS TmpTable;
CREATE TEMPORARY TABLE IF NOT EXISTS TmpTable
SELECT
@MyVAR as MyVar,
convert(:Field, CHAR(10)) as Field;
SELECT * FROM TmpTableSet the keyfields to 'Field'
Set Debug to true
Double click on the query and in the SQL Editor select 'Data Editor...'
The debug output will show this :
Code: Select all
SET @MyVAR = (SELECT Field FROM Table WHERE (Field = :Field) ;
DROP TEMPORARY TABLE IF EXISTS TmpTable;
CREATE TEMPORARY TABLE IF NOT EXISTS TmpTable
SELECT
@MyVAR as MyVar,
convert(:Field, CHAR(10)) as Field;
SELECT * FROM TmpTable) AND Field= :Field
:Field(String[5])='Value'
:Field(String[5])='Value'
:Field(String[5])='Value' Code: Select all
SELECT * FROM TmpTable) AND Field= :FieldIf I remove the 'where' located in the 'SET' statement, the query will be correctly changed and executed by MyDAC.
This is a simple exemple, in my case, I have about 20 parameters in my 'SET' statement...