| Subject |
creating unique key : usingprimair key and foreign key |
| From |
Dirk <coffee@mocca.like> |
| Date |
Mon, 1 Feb 2021 14:55:56 +0100 |
| Newsgroups |
dbase.getting-started |
Good day,
to collect information about all kind of articles and product i use the
following ( a main tabble and a child table)
by query
the main tabel get a unique nr and main information, this info putted
aswell in the child table :
the child table follows the main table as usual way..
the child table get his own unique nr as done by : see below:
because of using the indexname of the child query, i can not vome back
to the main query, meaning the child query doesn't follow the main query
anymore ..
once using the child query thers is no probleme to add or modify the info
but creating a new record i have to restart the programm
the watch is the index
does someone have a hint
Thanks
Dirk Cardoen,
function KNOP_CROSSBIJVOEG_onClick()
local crossK,crossOpslaan
crossOpslaan = this.parent.parent.vraagbak_crossen.rowset.indexname
this.parent.parent.vraagbak_crossen.rowset.indexname = "ivolgID"
if this.parent.parent.vraagbak_crossen.rowset.endoFset
crossK = "0000000001"
else
this.parent.parent.vraagbak_crossen.rowset.last()
crossK=
str(val(this.parent.parent.vraagbak_crossen.rowset.fields["eigenvolgnr"].value)+1,10,0,"0")
endif
this.parent.parent.vraagbak_crossen.Rowset.IndexName =
crossOpslaan
this.parent.parent.vraagbak_crossen.rowset.beginappend()
this.parent.parent.vraagbak_crossen.rowset.fields["eigenvolgnr"].value
=crossK
this.parent.parent.vraagbak_crossen.rowset.fields["crossingavedatum"].value
= date()
this.parent.parent.vraagbak_crossen.rowset.fields["crossvolgnr"].value =
this.form.rowset.fields["volgnr"].value
form.keuzedoos_crossfirma.datalink =
this.parent.parent.vraagbak_crossen.rowset.fields["crossleverancierId"]
form.keuzedoos_crossmerk.datalink =
this.parent.parent.vraagbak_crossen.rowset.fields["crossbrandnr"]
form.keuzedoos_crossprod.datalink =
this.parent.parent.vraagbak_crossen.rowset.fields["crossproductnr"]
form.keuzedoos_crosseenheid.datalink =
this.parent.parent.vraagbak_crossen.rowset.fields["crosseenheid"]
class::crosskleuren(null)
return
*****
|
|