Stef
User
 Fresh Boarder
| Posts: 4 |   | Karma: 0 |
|
Problem with master/detail cds
|
|
Posted: 2005/08/11 00:33 |
|
|
|
|
hello,
I'm trying to setup a simple master/detail form using AnyDAC cds components but I just can't get it right. The master/detail cds sample provided with AnyDAC works correctly. I've done the same with Borland ADO/CDS components and it works just fine also.
Using D7.1, database is access demo db supplied with AnyDAC
here is the form:
object Form1: TForm1 Left = 192 Top = 145 Width = 870 Height = 640 Caption = 'Form1' Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'MS Sans Serif' Font.Style = [] OldCreateOrder = False PixelsPerInch = 96 TextHeight = 13 object DBGrid1: TDBGrid Left = 24 Top = 160 Width = 657 Height = 120 DataSource = DataSource1 TabOrder = 0 TitleFont.Charset = DEFAULT_CHARSET TitleFont.Color = clWindowText TitleFont.Height = -11 TitleFont.Name = 'MS Sans Serif' TitleFont.Style = [] end object DBGrid2: TDBGrid Left = 24 Top = 288 Width = 657 Height = 120 DataSource = DataSource2 TabOrder = 1 TitleFont.Charset = DEFAULT_CHARSET TitleFont.Color = clWindowText TitleFont.Height = -11 TitleFont.Name = 'MS Sans Serif' TitleFont.Style = [] end object ADConnection1: TADConnection ConnectionDefName = 'Access_Demo' Params.Strings = ( 'ConnectionDef=Access_Demo') Connected = True Left = 64 Top = 56 end object ADCommand1: TADCommand Connection = ADConnection1 CommandText.Strings = ( 'select * from {id orders}') Active = True Left = 120 Top = 56 end object ADTableAdapter1: TADTableAdapter SelectCommand = ADCommand1 Left = 152 Top = 56 end object ADClientDataSet1: TADClientDataSet Active = True PacketRecords = 50 Adapter = ADTableAdapter1 Left = 184 Top = 56 end object ADCommand2: TADCommand Connection = ADConnection1 FetchOptions.Cache = [fiBlobs, fiMeta] CommandText.Strings = ( 'select * from {id order details}') Prepared = True Left = 120 Top = 96 end object ADTableAdapter2: TADTableAdapter SelectCommand = ADCommand2 Left = 152 Top = 96 end object ADClientDataSet2: TADClientDataSet Active = True PacketRecords = 50 MasterSource = DataSource1 MasterFields = 'OrderID' FetchOptions.Cache = [fiBlobs, fiMeta] Adapter = ADTableAdapter2 Left = 184 Top = 96 end object ADGUIxWaitCursor1: TADGUIxWaitCursor Left = 376 Top = 32 end object ADPhysMSAccessDriverLink1: TADPhysMSAccessDriverLink Left = 408 Top = 32 end object DataSource1: TDataSource DataSet = ADClientDataSet1 Left = 224 Top = 56 end object DataSource2: TDataSource DataSet = ADClientDataSet2 Left = 224 Top = 96 end end
|
|