Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Construct issue  (Read 11251 times)
Massimiliano D.
Posts: 15


« on: February 24, 2010, 11:59:42 am »

My problem is with a construct statements, it create a wrong query and the application crashes with -201 error,
but not all times, after a crash for example if i do it again with the same input data the construct works well.
It's quite difficult for me to understand why.

the runtime enviroment is : fglrun -V
fglrun 2.11.16 build-1169.166
Built Jun 19 2009 10:00:52
(c) 1989-2009 Four J's Development Tools

Some idea?
Sebastien F.
Four Js
Posts: 545


« Reply #1 on: February 24, 2010, 12:06:24 pm »

Hello,

What database server are you using?
Any idea what CONSTRUCT input causes the error?

I suggest that you set FGLSQLDEBUG=3 to get SQL debug output, so we can see what -201 syntax error occurs.

Maybe you should open a case through the support channel...

Thanks
Seb
Massimiliano D.
Posts: 15


« Reply #2 on: February 24, 2010, 12:14:32 pm »

We work only with oracle, Oracle 9.2.X or Oracle 10.2.X
This problems happens to several customers.

I was thinking for the FGLSQLDEBUG, but it slow down the application so i try another way to find out the problems but no result.
Now i try with FGLSQLDEBUG and than i will post the output.

Thanks regards Max
Massimiliano D.
Posts: 15


« Reply #3 on: February 25, 2010, 04:08:24 pm »

OK, i find out the problems, sometimes the construct return a qbe_select null indipendent on what the user types in the form.
Sebastien F.
Four Js
Posts: 545


« Reply #4 on: February 25, 2010, 04:25:36 pm »

Massiliano,

Make sure that INT_FLAG is set to FALSE before starting the CONSTRUCT instruction.

In 2.11, if INT_FLAG is TRUE, CONSTRUCT will set a NULL condition, even if user enters filter and clicks on OK.

Suggestion: Try version 2.21.02 ...

Seb
Reuben B.
Four Js
Posts: 1116


« Reply #5 on: February 26, 2010, 12:30:07 am »

Massiliano,

Make sure that INT_FLAG is set to FALSE before starting the CONSTRUCT instruction.

In 2.11, if INT_FLAG is TRUE, CONSTRUCT will set a NULL condition, even if user enters filter and clicks on OK.

Suggestion: Try version 2.21.02 ...

Seb



It is surprising how much existing code I see that has one line CONSTRUCT and DISPLAY ARRAY statements that doesn't follow the same coding standard wth regard to int_flag as the INPUT statement.

if you reset int_flag before INPUT statements, you ought to reset int_flag before CONSTRUCT and DISPLAY ARRAY statements

If you reset or test int_flag after INPUT statements, you ought to reset or test int_flag after CONSTRUCT and DISPLAY ARRAY statements. 


 

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Sebastien F.
Four Js
Posts: 545


« Reply #6 on: February 26, 2010, 09:24:22 am »

Reuben,

For me the programming pattern regarding int_flag is to set it to FALSE before any dialog except DIALOG, and test it in AFTER INPUT/CONSTRUCT/DISPLAY, then reset to FALSE after dialog execution (cleanup).

This is described here (for INPUT instruction):
https://4js.com/techdocs/genero/fgl/devel/DocRoot/User/RecordInput.html#PROG_STEPS

Note that the new DIALOG statement does not use int_flag like traditional dialogs.
You must write your own ON ACTION accept/cancel handlers.

But I agree using int_flag to detect dialog validation/cancelation has always been a "strange" principle to me.

Maybe clear new triggers would make that more "4glish"...

       ...
   AFTER ACCEPT
       ...
   AFTER CANCEL
       ...
   AFTER INPUT
       ...
   END INPUT

Execution order would be AFTER ACCEPT, AFTER INPUT or AFTER CANCEL, AFTER INPUT, following dialog validation or cancellation.

This is registered in as #11036, but setting priorities is not in my hands.
Anyone interested in this feature, please send your wish to support to give a higher weight.

Seb
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines