Subject | lookup dataset problem |
---|---|
Author | Gediminas |
Post date | 2004-11-02T12:57:54Z |
implementing lookup relation between 2 datasets, datasets are created
on the fly:
1-st dataset(name set to TuraiDataset):
SQL->Add( "select * from SP_Select_Turai( :Programos_ID );" );
InsertSQL->Add( "execute procedure SP_Insert_Turai( :Programos_ID ,
:TuroTipo_ID , null )" );
DeleteSQL->Add( "execute procedure SP_Delete_Turai( :Turo_ID )" );
CalculatedFields->Add( "TuroTipo_ID decimal(15,0)" );
KeyLinks->Add( "Turo_ID" );
MasterSource = mpOtherMasterDatasetDataSource;
MasterParamLinks->Add( "Programos_ID=Programos_ID" );
2 dataset(lookup):
SQL->Add( "select * from SP_Select_TuroTipai;" );
KeyLinks->Add( "TuroTipo_ID=TuraiDataset.TuroTipo_ID" );
KeySource = pFirstDatasetDataSource;
However, I get statement error: TuraiDataset.TuroTipo_ID not found
Is this due to fact, that TuroTipo_ID field naturally is missing in
the 1-st dataset (SP_Select_Turai returns: Turo_ID decimal(15,0) &
TuroTipas varchar(10))?
on the fly:
1-st dataset(name set to TuraiDataset):
SQL->Add( "select * from SP_Select_Turai( :Programos_ID );" );
InsertSQL->Add( "execute procedure SP_Insert_Turai( :Programos_ID ,
:TuroTipo_ID , null )" );
DeleteSQL->Add( "execute procedure SP_Delete_Turai( :Turo_ID )" );
CalculatedFields->Add( "TuroTipo_ID decimal(15,0)" );
KeyLinks->Add( "Turo_ID" );
MasterSource = mpOtherMasterDatasetDataSource;
MasterParamLinks->Add( "Programos_ID=Programos_ID" );
2 dataset(lookup):
SQL->Add( "select * from SP_Select_TuroTipai;" );
KeyLinks->Add( "TuroTipo_ID=TuraiDataset.TuroTipo_ID" );
KeySource = pFirstDatasetDataSource;
However, I get statement error: TuraiDataset.TuroTipo_ID not found
Is this due to fact, that TuroTipo_ID field naturally is missing in
the 1-st dataset (SP_Select_Turai returns: Turo_ID decimal(15,0) &
TuroTipas varchar(10))?