dbinderbr
18th September 2002, 23:55
Hello there,
I designed two simple sessions and a table to test the AFS functions.
But, I had some problems. It always inserts a blank record !!
I have created a table with the fields listed bellow:
- table: tudcb900
-> Code: tudcb900.codi.o - tcmcs.long
-> Name: tudcb900.nome.o - tcmcs.str50
-> Phone: tudcb900.fone - tcmcs.str15
There are only these fields, no relations, no conditions, no mandatory fields, nothing special at all.
The sessions: one that calls the maintain session of the table mentioned above containing the AFS functions. There are nothing special used in these sessions, the maintain session of the table tudcb900 has a script only with the table declaration, nothing else.
The script that has the AFS functions I have posted as an attachment with the log file generated by the execution.
I dont know what to do... I've tried everything, apparently I wrote the script following percfectly the AFS manual.
Thanks in advance.
mark_h
23rd September 2002, 16:25
Just wondering if you got it working yet? One suggestion I have is for you to put some sections in the tudcbo291m000 session. Compile it in debug mode and see what happens when you run the function server. It may give some clues as to why the table fields are empty. Just a thought.
Mark
dbinderbr
23rd September 2002, 17:15
Thanks Mark !
I couldnt make it work yet, but I will try to debug the called session and look for errors.
Have a nice week.
dbinderbr
24th September 2002, 00:04
Hello Mark,
Unfortunatelly I couldnt make it works... it keeps inserting just a blank record. I have tried with another sessions, but it didnt work. I have reviewed the Baan AFS manual many times and I was not able to find any mistake in my code !! It's almost equal to the manual.
I will try to call a friend of mine that works in Baan Support Team and ask her if she have already heard something about this kind of problem with AFS.
Thanks for attention.
mark_h
24th September 2002, 15:28
Yes your AFS code does look okay. I was just wondering what happens when you start your maintain session. That why I recommended adding sections to it, that way you could see what your table fields had in them during the insert process(when they became empty). Contacting Baan support is a good idea. Have you loaded the latest tools package for the stpapi commands?
Good Luck!
Mark
dbinderbr
24th September 2002, 21:30
Hello Mark, Hello Gordon...
Mark, I tried to create some sections like check input to debug the called session by the stpapi functions. I couldnt get anything special... I just could certify that the fields were really empty.
I believe the tools objects are up-to-date because we have just finished replace the Baan IV C3 by the C4 with the latest updates.
I have posted a zip file containing everything about the sessions: sessions definitions, table definition, the screen captured of the forms, the afs log file and both program scripts.
I believe there is just a small detail wrong.. but small enough to make it not to work right.
Thanks for your attention.
mark_h
25th September 2002, 00:41
Gordon and Daniel,
Did I miss something? From his documentation it looks like a form type 1 - not form type 3. Anyway I still think Gordons' answer may solve the problem.
Mark
Guillaume.G
25th September 2002, 10:31
Hi Daniel,
I try your script (with the same table and same script) and the result is good.
The AFS insert the record ans in the second pass the message is "the record already exist"
I think that you have not the good version of ttstpapihand.
When i start to work with AFS, i'm the same problem.
The minimum solution for use the AFS without bugg is : 126067 and the last solution is 127443.
I have the solution 126067 in my system and is very good.
For know your version of ttstpapihand, you can use the bic_info utility.
Best regard
Guillaume Gillet.
Technical Consultant & Development
France - Lyon
dbinderbr
25th September 2002, 18:01
Hello there !!
Well...
First of all I would like to say that I am grateful for the help of each one of you.
I have tried everything you guys told me...
- Gordon, the form is really of type 1, but even so I tried the change.view and it kept not working.
- Mark & Guillaume I installed the latest solution 127433 and... it's still not working.
Guillaume, are you sure that it didnt added just a blank record? Because in my script, when you run it, it adds 100 records, if you have received the message "Record already exists" in the first execution probably you had the same problem, it should give this message only in a second execution because on this time the records would really exist.
The table has no conditions, so it accepts a key filled with zero, if I change the field "code" to mandatory it will not insert even this blank record (I tried this with a more complex session).
What makes me confused is that the log shows the values are being sent to the called session by the stpapi functions !! I dont know what else I can do.
Thanks in advance.
Guillaume.G
25th September 2002, 18:57
Hi daniel,
I'm retry your script.
My scenario :
A - create sessions
------------------------
- Create the table with the same fields
- Generate a sample session (type 1) with a sample script (with only the declaration of the table, not other section)
- Create a session for testing AFS with your script
B - testing with data
--------------------------
- I'm insert several record in the maintain session
- I'm run the AFS session ==> it's ok and i have not blank record
and i have the message of your script "Record Inserted Sucessfully."
- In the second execution : no insert but the message "Record already exist"
You can see in the attach file :
- AFS.log (you can see that it's not the same of your test)
- the version of ttstpapihand wtih the command
bic_info6.1 -w ottstpapihand
For information : i'm in Baan IV c4, Unix(AIX 4.3) and Oracle 7.3
Good Luck
Guillaume G.
dbinderbr
25th September 2002, 20:31
Hello my friends...
Yes, It's working !!!
What did I?
I was almost giving up when I decided to navigate in the Baan site and look for a last chance of solution for my problem in the knowledge base.
So, I reached the topic "Problems solved in function server". It's the solution 115279. I downloaded it and some other dependencies that I hadnt installed in my environment like the solutions 128282 and 159592.
After these updates the session started to work right !!!
:cool: Thank you very much Mark, Gordon and Guillaume !! :cool:
mark_h
25th September 2002, 21:17
Glad you got it working and thanks for posting the solution. This may help someone else resolve a problem. Even the Baan Support Center has problems suggesting solutions at times. :)
Mark
Guillaume.G
26th September 2002, 10:31
Hi Daniel,
it's very good
For information, the solution 157719 its the first patch that i install when i start to work with AFS.
it's the version of ttstpapihand which finalized and officialized the AFS project.
After this solution (2001-09) the function server will be part of the standard program solution (10923 for B40 c)
So the last version of AFS is in solution 127443 (2002-09-09)
But, actually i run the afs with the version of 2002-06 (sol 126067)
good Work with AFS
Best Regard
Guillaume G.