Pages: 1 ... 5 6 [ 7] 8 9 10
61
on: October 10, 2024, 10:19:49 am
|
Started by Benjamin G. - Last post by Benjamin G. |
Hello, look this sample code, i don't see what is wrong ...
MAIN CONNECT TO "db@server" AS "db" CALL testcursor_1() -- doesn't work CALL testcursor_2() -- work EXIT PROGRAM END MAIN
FUNCTION testcursor_1() DEFINE numcli STRING DEFINE nomcli STRING = '?' DEFINE cussup STRING
LET numcli = '8905' DECLARE ctest1 CURSOR FOR SELECT custname FROM fdecus WHERE custnr=$numcli AND cussupcd=? TRY LET cussup = 'C' OPEN ctest1 USING cussup # SQL ERROR -254 ? FETCH ctest1 INTO nomcli CLOSE ctest1 FREE ctest1 DISPLAY "TESTCURSOR_1 SUCCESS : " || numcli.trim() || ' is ' || nomcli CATCH DISPLAY "TESTCURSOR_1 CATCH ERROR : " || err_get(status) END TRY END FUNCTION
FUNCTION testcursor_2() DEFINE numcli STRING DEFINE nomcli STRING = '?' DEFINE cussup STRING DEFINE rq STRING
LET numcli = '8905' LET rq = 'SELECT custname FROM fdecus WHERE custnr="' || numcli.trim() || '" AND cussupcd=?' DECLARE ctest2 CURSOR FROM rq LET cussup = 'C' TRY OPEN ctest2 USING cussup # SQL ERROR -254 ? FETCH ctest2 INTO nomcli CLOSE ctest2 FREE ctest2 DISPLAY "TESTCURSOR_2 SUCCESS : " || numcli.trim() || ' is ' || nomcli CATCH DISPLAY "TESTCURSOR_2 CATCH ERROR : " || err_get(status) END TRY END FUNCTION
*** Debugging 'testcursor' *** TESTCURSOR_1 CATCH ERROR : Too many or too few host variables given.
TESTCURSOR_2 SUCCESS : 8905 is GARCIA BENJAMIN Program exited normally. *** Execution of 'testcursor' finished. Exit code: 0 ***
|
62
on: October 09, 2024, 02:14:48 am
|
Started by Reuben B. - Last post by Reuben B. |
A technique to better read values across rows when there are many columns is to render alternate rows with a different background color. In Genero screens, this can be achieved with the alternateRows Presentation Style attribute. In printing, this was historically achieved with the iconic green bar paper. With more modern printers using blank A4 paper, this would mean using ink to render the different background colors and fell out of fashion. In today’s world, reports are rarely physically printed out on paper and more typically viewed on screen, and so the requirement to print alternate rows with a different background color is back in fashion. A new class RepeatingRegion was added to Genero Report Writer 5.00 that keeps a counter of regions that repeat and can be used to render alternate rows with a different background color. Read more at https://4js.com/ask-reuben/ig-250/
|
63
on: October 09, 2024, 02:13:17 am
|
Started by Reuben B. - Last post by Reuben B. |
A core property of the Front-End protocol is that the synchronization of the User Interface occurs when the runtime next asks for some user interaction. If the runtime is doing some processing, there will be no update of the user interface until the next piece of user interaction, that is when the processing finishes. This has some implications for processes that take a number of seconds to process. One such gotcha is the case where the user clicks on a warning “Are you sure you want to do this?” dialog before some processing. Read more at https://4js.com/ask-reuben/ig-249/
|
64
on: October 09, 2024, 02:10:40 am
|
Started by Reuben B. - Last post by Reuben B. |
In my role I am frequently creating small examples and it used to annoy me that sometimes a date example would have a DATEEDIT widget with a value that defaulted to 31/12/1899 and sometimes it wouldn’t. I had got into the habit of setting the date to TODAY so that when I opened the calendar widget I did not have to scroll through many years to enter a relevant date. A recent forum post (thank you Benjamin G) sent me off down a rabbit hole that helped to explain why the date variable had the value 31/12/1899 and why sometimes it was NULL. Read more at https://4js.com/ask-reuben/ig-248/
|
65
on: October 09, 2024, 02:08:19 am
|
Started by Reuben B. - Last post by Reuben B. |
Both the Genero Studio User Action functionality and the execute front-call generate the same question. The question typically arises because you find you can enter a simple one word command and it will execute but then when you add more to the command such as redirection, setting of environment, the command will not execute as you think it should. The trick is to make the command you are executing a shell such as sh, bash, zsh (Linux and OSX) or cmd (Windows), and what you want to execute as arguments to this. Read more at https://4js.com/ask-reuben/ig-247/
|
66
on: October 09, 2024, 02:06:40 am
|
Started by Reuben B. - Last post by Reuben B. |
When executing a Genero application, you can execute a fglrun program-name.42r or a fglrun module-name.42m. The question gets asked, what file should be used? The key is to understand the difference between a .42m and a .42r, and how you have coded and built your application. Read more at https://4js.com/ask-reuben/ig-246/
|
67
on: October 09, 2024, 02:05:06 am
|
Started by Reuben B. - Last post by Reuben B. |
When investigating Genero Application Server (GAS) issues, one of the first things you might be asked to do is to increase the level of logging. This can be done by changing the CATEGORIES_FILTER value to ALL or DEBUG and will normally result in a groan being emitted by the GAS system administrator as they believe this means stopping and restarting the GAS dispatcher. Since 4.01, there is a way this can be done that without stopping and restarting the GAS dispatcher as mentioned in the 4.01 GAS New Features. This involves using the gasadmin tool and is achieved via use of the reset-log verb. Read more at https://4js.com/ask-reuben/ig-245/
|
68
on: October 09, 2024, 02:03:15 am
|
Started by Reuben B. - Last post by Reuben B. |
One of the first things junior developers learn the hard way when they are starting out is the importance of using CLIPPED with CHAR variables. If you forget CLIPPED when concatenating CHAR you will see some spaces in the middle of your concatenated string. With the prevalence of STRING variables, developers can fall into the habit of not using CLIPPED, particularly when passing arguments to functions. ui.ComboBox.addItem calls and methods involving filenames are the common places where the CLIPPED is forgotten. Read more at https://4js.com/ask-reuben/ig-244/
|
69
on: October 09, 2024, 01:52:28 am
|
Started by Reuben B. - Last post by Reuben B. |
GBC 5.00.08 ( https://4js.com/online_documentation/fjs-gbc-manual-html/#gbc-topics/gbc_whatsnew_50008_2.html) added the ability for the GBC to manage the paste of clipboard content from Excel. The techniques referred to in this article are still valid and interesting, but you can review wether the default paste behaviour now meets your needs and means you no longer need to use the techniques listed in this article.
|
70
on: October 07, 2024, 01:32:17 pm
|
Started by Snorri B. - Last post by Evandro S. |
Hi Seb,
We are testing v5 and we planning this upgrade to 2025.
The context is an integrator, where users can configure in a user interface the function and parameters to execute receiving requests through API or via crontab.
I already know the concept of functions in 4gl and genero, and i know that all is possible simplyly programming a new static 4gl program for each integration i want to... but i'm looking to do something different, smarter and easy to use.
i know too that we could have professional support, but as i've found this article of someone doing something similar to what i need, it was the reason i'm here asking for help.
|
Pages: 1 ... 5 6 [ 7] 8 9 10 |