select ... where MasterLink=:MasterLink

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
hetfield
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 22.09.2005, 10:35

select ... where MasterLink=:MasterLink

Post by hetfield »

Hi,

i use Zeos 6.5.1 with BCB6 & mysql 4.1.15.

I have a simple project for testing master/detail functionality!

My master table has a column "MasterLink" wich is filled by a "select UUID()" statement. Column type is varchar(36). The detail table has a equivalent column. The value of the detail field is set in the "OnNewRecord" event of an Clientdataset.

Adding new records works very well. After calling the ApplyUpdates method of the masters clientdataset the master and the detail record will be inserted correctly.

If i refresh the masters clientdataset via Close() and Open() method, only the master records will be displayed in dbgrid!

The TZSQLMonitor logs the following:

CONNECT TO "DBX" AS USER "mt"
select Bez,Masterlink from Tab1

SHOW TABLES FROM DBX LIKE 'Tab1'
SHOW COLUMNS FROM DBX.Tab1 LIKE '%'
select Bez,MasterLink from Tab2 where MasterLink=NULL
SHOW TABLES FROM DBX LIKE 'Tab2'
SHOW COLUMNS FROM DBX.Tab2 LIKE '%'
msg: select UUID();

mysql-4.1, msg: select Bez,Masterlink from Tab1

INSERT INTO DBX.Tab1 (Bez,Masterlink) VALUES ('Master1','3bdbc9fc-8083-1028-9017-0002b38d6c88')
select Bez,MasterLink from Tab2 where MasterLink=NULL
INSERT INTO DBX.Tab2 (Bez,MasterLink) VALUES ('Detail1','3bdbc9fc-8083-1028-9017-0002b38d6c88')
mysql-4.1, msg: select Bez,Masterlink from Tab1
select Bez,MasterLink from Tab2 where MasterLink=NULL
mysql-4.1, msg: DISCONNECT FROM "DBX"

Why is is the value of "MasterLink" = NULL?

THX

Hetfield
User avatar
fduenas
Zeos Dev Team
Zeos Dev Team
Posts: 132
Joined: 26.08.2005, 08:12
Location: Cancún

Post by fduenas »

are you using TZUpdateSQl objectplz post your sql statement of each of your queries and what type of link did you use (masterdatasource link or DataSource property link).
Post Reply