Home » Developer & Programmer » Forms » count hit in oracle forms 6i. (forms 6i, database 11g)
count hit in oracle forms 6i. [message #676213] Tue, 21 May 2019 05:11 Go to next message
asifcs
Messages: 5
Registered: May 2019
Location: pakistan
Junior Member

Hi All,
I want to count the hit(click) in when button pressed trigger. Please elaborate the ways How we can count that how many times button has been pressed.
In fact I want to calculate the number of downloading of file (from a sharing drive using forms 6i.) and want to limited downloading of file e.g 5 times a file can be downloaded. every click on a button will be counted as download.

Thanks in advance.
Re: count hit in oracle forms 6i. [message #676214 is a reply to message #676213] Tue, 21 May 2019 05:15 Go to previous messageGo to next message
cookiemonster
Messages: 13630
Registered: September 2008
Location: Rainy Manchester
Senior Member
Have a datablock item / global variable
Set it to 0 when the form starts (when-new-form-instance)
increment by 1 in when-button-pressed
Re: count hit in oracle forms 6i. [message #676220 is a reply to message #676214] Tue, 21 May 2019 07:05 Go to previous messageGo to next message
asifcs
Messages: 5
Registered: May 2019
Location: pakistan
Junior Member

cookiemonster thanks for your reply. But I need at whole not for every time form startup. I want to store these count in database and only DBA could reset or decrease the number of downloads. Please give me example code where I count the number of clicks and store it in database.
Re: count hit in oracle forms 6i. [message #676221 is a reply to message #676220] Tue, 21 May 2019 07:19 Go to previous message
cookiemonster
Messages: 13630
Registered: September 2008
Location: Rainy Manchester
Senior Member
Call a stored procedure in the when-button-pressed that does an insert/update as appropriate into the table you want to store this.
Make the procedure an autonomous_transaction.

It's not difficult.
Previous Topic: MULTIPLE PROGRESS BAR FOR STORED PROCEDURE
Next Topic: block property
Goto Forum:
  


Current Time: Wed Jun 26 21:59:30 CDT 2019