Hello...
i build a format control for a form.
I set up the format control like this:
$query="logical.name=\""+name in $file+"\"";$insert="GRUND";$datum=str(tod())
$L.vendor=bemerkung in $file;$step="1"
$L.void=rtecall("rinit", $L.rc, $L.datei, "device")
if ($L.rc=0) then ($L.void=rtecall("select", $L.rc, $L.datei, $query);$step="3")
if ($L.rc=1) then (comments in $L.datei=insert(comments in $L.datei, 1, 1, $insert))
if ($L.rc=1) then (datum in $L.datei=insert(datum in $L.datei, 1, 1, $datum))
if ($L.rc=1) then ($L.void=rtecall("rupdate", $L.rc, $L.datei);$step="5")
all this updates the field datum and comments in the device table when a record in the file "test" has changed.
What I would like to do now is when i ADD a record in the test-table.. i would like to add that record into the device table too.
So I tryed it like this:
(Condition for each entry: ADD=true)
$query="logical.name=\""+name in $file+"\"";$insert="GRUND";$datum=str(tod())
$L.name=name in $file;$step="1"
$L.void=rtecall("rinit", $L.rc, $L.datei, "device");$step="2"
if ($L.rc=0) then (logical.name in $L.datei=$L.name;format.name in $L.datei="TESTMODELL";$step="3";$test3=$L.rc)
if ($L.rc=0) then ($L.void=rtecall("radd", $L.rc, $L.datei);$step="4";$test4=$L.rc)
Like i can see on the variable $test and $step.. the expressions are all ok. The only thing is. that $L.rc is "-2" when it reaches the last expression.. and THAT i dont understand.
Maybe someone with a little bit more experience than I have sees what i am doing wrong?
I just started with RTE-Calls.. and dont know so much about it yet.
Thanks for ANY help!!
Many greetings from Germany...
Frank


Reply With Quote
Bookmarks