How to reset the State of package variables in all sessions connected (without requiring a disconnection and a connect) if they are reset in one of connected sessions.
Hi people,
Need help, the example requires that the value of packet data 'g_var' must be updated in the session/s connected everywhere without the session/s to be disconnected and reconnected.
Here's the scenario:
I created a table my_table having the pair name / value.
A variable with global package "g_var' in his body and a get accessor method to access g_var variable from the outside world.
This variable g_var is initialized within the block of the entry into force of the package and retrieves the current value of the variable from my_table.
When I update the value in the table a trigger on my_table would reset the State of the package and therefore g_var to the most recent value in the same session
All is well so far since the change in value is reflected in the current session, but if I've already connected session/s
and I'm trying to retrieve the value of "g_var", it is not updated in already connected sessions and remains the same before the update.
Can U help please how can I update this value in a session/s connected without having to disconnect and reconnect.
because if I disconnect and reconect the existing sessions, it seems to show the updated value.
Thanks in advance.
Kind regards
Gaurav Rajput
Here are the Scripts:
drop table my_table;
create table my_table
(
my_variable_name varchar2 (100),
number of my_variable_value
);
create or replace package my_package as
Function get_g_var return number;
end my_package;
/
create or replace package body my_package as
number of g_var;
Function get_g_var return number is
Start
Return g_var;
exception
while others then
lift;
end get_g_var;
procedure init (my_passed_name varchar2) is
Start
Select my_variable_value in the g_var from my_table where my_variable_name = my_passed_name;
exception
while others then
raise_application_error (-20004, "I got an error during Init");
end init;
Start
init ('$'); -This is a call to time when the package is loaded into the memory of session
exception
while others then
raise_application_error (-20003, 'Error in my_package');
end my_pACkage;
/
create or replace TRIGGER my_trigger
BEFORE DELETE OR UPDATE
ON my_table
FOR EACH LINE
declare
number of my_ret;
Start
DBMS_SESSION.modify_package_state (DBMS_SESSION. RESET);
exception
while others then
lift;
end my_trigger;
/
-It is initially set to null
insert into my_table values ('DOLLAR', 62);
commit;
-test value for first time to package loading (62 views)
Select * from my_table;
Set serveroutput on
declare
my_variable varchar2 (100);
BEGIN
my_variable: = my_package.get_g_var;
dbms_output.put_line ($my_var);
END;
-run the same block of end to start in another session it shows 62. All is well so far
-check if the value after the update in the same session (shows 38), also check in another before the connected session as well (shows 62 and not 38)
Update my_table set my_variable_value = 38 where my_variable_name = "DOLLAR";
commit;
Select * from my_table;
Set serveroutput on
-It displays 38 in this session, but there in an already connected session 62 and only after you log out shows 38
declare
my_variable varchar2 (100);
BEGIN
-my_variable: = my_package.g_var;
my_variable: = my_package.get_g_var;
dbms_output.put_line ($my_var);
END;
Package variables are stored in the private memory (PGA). The value is not visible in the session. A package variable is therefore not approach appropriate to your problem. You can look at in the context of the Application, as Solomon has said.
http://docs.Oracle.com/CD/B28359_01/network.111/B28531/app_context.htm#CIHFJHCG
Tags: Database
Similar Questions
-
How to get the State of the button?
I want to know how to get the State clicked the button? If it is clicked State or State clicked?
For ex: I have the following code...
{( < composants: IconButton id =»bold_btn"largeur =»22" icône =»@Embed('/assets/bold.png')"click ="onBoldClick ()"enabled =" {}this.loadCompleted}"toggle ="true"/ >
How to find if the "BOLD" button is checked or not?
this.bold_btn. ???
Please mark
-
Hallo,
on a view object, I create my view of the criteria customized; I'm going to use it to create a "query with the table panel.
I wish that his beahviour, when I use it to create a "query with the table panel", corresponds to that of "attributes searchable all.
Unfortunately I'm having some trouble in his creation and I would like to see how is made the "object view where Clause" CV "all searchable attributes.
My VO motion is:
Select the username, name, RegisteringDate
I would like to create my VC in a way that is the result "query with table Panel:
UserId | ___ |
Name | ___ |
RegisteringDate of | ___ | to |_________|
For each search field, I set a variable binding (PName, PUserId, PRegisteringDateTo, PRegisteringDateFrom).
Each field must be used in the "query with table Panel" only if it is filled with a value.
You kindly help me?
Thank you very much
F.
The criteria to view all searchable attributes is implied all the attributes of a vo. Each attribute is used unless you specify a value for it. The problem with this IS, is that you can not change it.
However, you can build your own RESUME that works in the same way, but allows you to change certain attributes. To do this, you create a new business card and add each attribute, select the operation you want to test the attribute against (equals, start by,...). You do not bind variables for attributes specify. The framework will add them for you automatically.
The only thing that can not this vc is check varies as you want to do when you check "RegisteringDate." To do this you must use bind variables.
Once you have create this EGG and it makes you drag onto the page you can use it as the "all attributes searchable.
Timo
-
How to access the firefox on laptop Office keeping all the features?
How to access the firefox on laptop Office keeping all tabs and bookmarks?
Hello
You may be able to do this in Firefox Sync configuration on both devices. Please see for detailed instructions.
-
I want to know how to restore the computer to its factory settings, when I bought from a private party and have an administrators access code
Hello
What is the brand and model of the computer?
The best method is to contact the computer manufacturer for help on how to set the computer to its factory settings.
Hope this information helps.
-
Original title: no local network connection
No links to the local area network connection. But how to use the Internet again, please help establish a LAN connection.
Hi H.mustafaakyurek,
· What operating system is installed on your computer?
You can view the following items on the creation of a network connection:
Setting up a network home
http://Windows.Microsoft.com/en-us/Windows7/setting-up-a-home-network
Start here to set up a home network in Windows 7
http://Windows.Microsoft.com/en-us/Windows7/start-here-to-set-up-a-home-network-in-Windows-7
Setting up a wireless network
http://Windows.Microsoft.com/en-us/Windows7/setting-up-a-wireless-network
Also see the following articles on the connection of an Internet connection:
What do I need to connect to the Internet?
http://Windows.Microsoft.com/en-us/Windows7/what-do-I-need-to-connect-to-the-Internet
Allows to connect to the Internet mobile broadband
http://Windows.Microsoft.com/en-us/Windows7/use-mobile-broadband-to-connect-to-the-Internet
Hope this information helps.
-
How to use the parameter B-BIS in a factory of connections
How to use the parameter B-BIS in a factory of connections (OS 5.0)?
I have found no no API for it.
-
How to install the output in bridge CC module using an apple OSX 10.9.5 and a miss apple OSX 10.11 this point completely in CC bridge!
Hi abev41080082
Greetings.
- Please visit this link and follow the instructions
Concerning
Rohit
- Please visit this link and follow the instructions
-
I need my files to open in the monitor # 2 I usually have some important information about the number of monitor 1. I need the files to alternate when they are open. One in 2, then one 1.
Kind regards
How it works is usually the application (explorer.exe is an application) in question is open about everything that monitor his last (final) session was closed the. Not all applications have this built-in memory, but most do.
I don't think that even something TO manage multiple monitors (this is what it was built for) will do what you are wanting. ;-) I see no way of programming of this type of automation. ;-)
-
What is the difference in verses apps for each of the programs to purchase and download it? They are the same thing and they are simply called "apps"? Are the applications of complete programs?
Yes.
Adobe uses confusion of terminology in their efforts to explain things.
Cloud desktop applications are the same as the purchase of the software on disk in the days avant-nuage. for example, the Photoshop Cloud desktop application is the full version of Photoshop CC 2015.
-
I opened my photos of my SDCard with File Explorer, select them all, then I select move to fill after that I saw the bar of loading with the green line. After that all my photos from my computer disappered and were removed from my SD card. Help, please
I looked everywere in my computer, but they are not found
I bet that you have selected the folder Adobe Bridge CC or CS6, and it would be in there under Program Files/Adobe/or Program Files (x 86) / Adobe /.
Move to... in the file Explorer apply only to records not the bridge program.
You open Bridge and Photo Downloader allows you to move pictures from your SD card in the deck (also called import)
Gene
-
I bought the student some time ago and downloaded cc, but they are all trials, and they didn't tell theres no subscription found. What should I do to fix this?
Your subscription to cloud shows correctly on your account page?
If you have more than one email, you will be sure that you use the right Adobe ID?
https://www.adobe.com/account.html for subscriptions on your page from Adobe
If Yes
Some general information for a subscription of cloud
Cloud programs don't use serial... numbers you, connect you to your cloud account paying to download & install & activate... you may need to sign out of the cloud and restart your computer and log into the cloud for things to work
Sign out of your account of cloud... Restart your computer... Connect to your paid account of cloud
-Connect using http://helpx.adobe.com/x-productkb/policy-pricing/account-password-sign-faq.html
-http://helpx.adobe.com/creative-cloud/kb/sign-in-out-creative-cloud-desktop-app.html
-http://helpx.adobe.com/x-productkb/policy-pricing/activation-network-issues.html
-http://helpx.adobe.com/creative-suite/kb/trial--1-launch.html
-ID help https://helpx.adobe.com/contact.html?step=ZNA_id-signing_stillNeedHelp
-http://helpx.adobe.com/creative-cloud/kb/license-this-software.html
If no
This is an open forum, Adobe support... you need Adobe personnel to help
Adobe contact information - http://helpx.adobe.com/contact.html
-Select your product and what you need help with
-Click on the blue box "still need help? Contact us. "
-
How to set the value of a variable in automator?
I'm totally new to automator I found a post that I try to reuse
to Re: copy multiple files from TextEdit in one Word file
I want to open a series of html files in a folder and convert in a TextEdit rtf file.
However, I am unable to automator find out how set the value of a variable such that it appears in this post
I looked at every command in library without a lot of fortune
Any help?
Thank you
Dan
Its in Utilities.
In Automator, use the search box:
-
How to make the State "out-of-box' again on my Satellite L653-12J
Hello
I have been in charge of research and following the instructions but all have failed.
I'm selling my Toshiba Satellite computer laptop L653-12J with Windows 7 and I would like to clean the hard drive of all the data added to have it back to its out of the box state.Please advise me how?
Thanks and regards,Kamal
Hello Kamal
How to install the recovery image, which you can read on follow Toshiba document -.
http://APS2.toshiba-tro.de/KB0/HTD1303440001R02.htmIt works for you?
-
How to set the value of a variable in a cluster in LabVIEW to c#?
Hi guys, I'm working on a small c# program, which by using the interface provided by LabVIEW. And I know that, with the help of lv. SetControlValue (name, value) can set a variable just on the front panel. But in my case, there are several groups on the front panel. Then it confused me how to set the variables in these groups. For example, there is a cluster named clusterA and a variable named a., I tried something like this:
lv.SetControlValue("clusterA.valueA",1);
but it totally inoperable. Everyone has some experience with this sort of thing? Thank you very much!!
Hey guys, thanks a lot for all your response. I just found a simple way to solve this problem. For example, there is a cluster named "ClusterA", and there are only two witnesses, who are: an int value named "IntA" (default = 10 IntA value) and a string value named "StringA" (by default the StringA = 'abc'). In c#, if you call the method:
var clusterA is vi (Array). GetControlValue ("ClusterA");
you will get a table looks like: clusterA = {10, 'abc'}; So if you want to change IntA 123, you simply do:
clusterA.SetValue (123, 0); 123 the value, 0 is the index of IntA in clusterA, after this clusterA table = {123, 'abc'}
After that, simply to make the table in LabVIEW using:
VI. SetControlValue ("ClusterA", clusterA);
and now you see the LabVIEW, IntA is changed.
Maybe you are looking for
-
Satellite C50-A483 and Win8.1 - quality of the Webcam is very low
Hi friends, Yesterday, I bought a new laptop Toshiba Satellite C50-A483, single language 8.1 for Windows, 64-bit, which I am very disappointed by the results of the webcam, its too fuzzy, there is no options to change the settings for the webcam, pre
-
HP 2000: administrative password or poweron password
Locked out of password recovery please code is 54305373 thanks
-
Windows 8.1 does not recognize my scanner
I recently bought a new computer from DEll desktop with Windows 8.1. My printer, HP DEskjet F4180, prints and copies but does not scan. I tried to install using the original disk and an icon for appeard Center Solution HP on the desktop, but when I
-
I have a USB-6008. I have a linear potentiometer attached to the USB DAQ. Now I can view the output voltage of pot in LabVIEW through the AI0 on USB DAQ channel. However, I would also like to be able to show the position of the stem of the linear pot
-
Hi, I've been through the web site looking for a used laptop, but there is so much of different. I mainly use it for surfing the net, Facebook, emails and the occasional document. I don't play games on it or watch movies. Can anyone recommend that it