Subject | Re: [IBO] Updating detail TIBOQuery causes PK violation |
---|---|
Author | Helen Borrie |
Post date | 2003-12-08T22:10:55Z |
At 06:28 PM 8/12/2003 +0000, you wrote:
for Keylinks as well...
'TAXYEAR_ID')
the joining columns in an SQL-89-style inner join query
GeneratorLinks for it. If not, you'll have to pass it yourself.
If you mean the foreign key value for the TaxYear table, the Datasource
linkage will cause the TAXTABLE_ID to be picked up automatically from the
master table.
correctly and it will be automatic.
Helen
>I have a M/D relationship between 2 TIBOQuerys where the detail queryDual KeyLinks doesn't belong in a M/D relationship...wrong column chosen
>uses a DataSource and has a parameter for the detail query.
>
>When I go to change a value in the detail query and the update SQL is
>prepared, it uses the master_id field as the record identifier rather
>then the record identifier. (But it just makes that assumption about
>it--I did not set a record identifier anywhere... where would I?)
>
>Below is the detail query. The master field identifier is
>TAXTABLE_ID, the detail field identifier is not shown (TAXYEAR_ID).
> object qryYears: TIBOQuery
> Params = <>
> AutoFetchAll = True
> DatabaseName = 'APTAXFILES_1'
> IB_Connection = ibConn
for Keylinks as well...
> KeyLinks.Strings = (KeyLinks.Strings = (
> 'TAXTABLE_ID = :TAXTABLE_ID')
'TAXYEAR_ID')
> ReadOnly = TrueShould not be here. JoinLinks has nothing to do M/D - it is for listing
> RecordCountAccurate = True
> DataSource = dsTables
> JoinLinks.Strings = (
> 'TAXTABLE_ID=:TAXTABLE_ID')
the joining columns in an SQL-89-style inner join query
> SQL.Strings = (If you mean the PK of the detail table: If it is a generator, use
> 'select * from TaxYear')
> FieldOptions = []
>...<field list/>
>
>Is there a way to set the record identifier?
GeneratorLinks for it. If not, you'll have to pass it yourself.
If you mean the foreign key value for the TaxYear table, the Datasource
linkage will cause the TAXTABLE_ID to be picked up automatically from the
master table.
>I realize I set the EditSQL statement (which I have done) but itYou don't need to set the EditSQL for this. Just set up the properties
>seems that I am doing something wrong in the SQL as I haven't had to
>do this before (with other backends).
correctly and it will be automatic.
Helen