Want to get rid of Google Ads, click here.
+ Reply to Thread
Results 1 to 6 of 6

Thread: RTE-Calls

  1. #1
    Senior Member eisefr's Avatar
    Join Date
    Nov 2001
    Location
    Germany
    Posts
    538

    Default

    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

  2. #2
    Senior Member
    Join Date
    Jan 2002
    Location
    The Netherlands
    Posts
    930

    Default

    Frank,



    -2 as a result means NULL key, which is correct as you don't fill the "type". Check the DBDict of any record you try to add through eihter posting or RTECalls, to ensure you fill all fields used in "No Nulls" and "Unique" keys.

  3. #3
    Senior Member eisefr's Avatar
    Join Date
    Nov 2001
    Location
    Germany
    Posts
    538

    Default

    UPS.....



    THAT i didn't think about!



    Thanks alot(!!!!) Jos! :smile:



    Do you know where i can get a list with the error codes? As fast as you got that.. i guess there IS a liste availible..



    :grin:

  4. #4
    Senior Member eisefr's Avatar
    Join Date
    Nov 2001
    Location
    Germany
    Posts
    538

    Default

    I changed the fc :



    if ($L.rc=0) then (logical.name in $L.datei=$L.name;format.name in $L.datei="TESTMODELL";type in $L.datei="workstation";$step="3";$test3=$L.rc)





    With the type in it.. it works pretty good!!!!



    Thanks alot again!!!!!

  5. #5
    Senior Member eisefr's Avatar
    Join Date
    Nov 2001
    Location
    Germany
    Posts
    538

    Default

    Damn i like those RTE-Calls!



    I never understood them so good..



    But 2 days ago i got that new book from Mike Sanders... there is a really good example in it!



    That helped me alot!



    :grin: :grin: :grin: :grin:

  6. #6
    Senior Member
    Join Date
    Jan 2002
    Location
    The Netherlands
    Posts
    930

    Default

    The error codes are listed in the SC4 SysTailor2 documentation, as part of the explanation of the rtecalls.



    You can get the doc through the PRGN support site. :wink:

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts