How can we implement the currency translation in a query definition
How can we implement the currency translation in a query definition and should it modified for each and every type of currencies
hi rama krishna
i think u can not get any translation in Query. this is only for het the report as it is there in tables. if u want to write a report take a help of the Abaper
hope u goit,assign points if u ok for this
thanks
subbu
Similar Messages
-
Can I run the currency translation for multiple years at the same time?
Dear Friends,
I set up currency translation on our BPC NW 7.0 system and it is working fine ONLY if I run it for any one year at a time. But if I select multiple years in the data package (FX Restatment) selection it only calculates for the first year in that selection.
say if I run the data package for years: 2009, 2010, 2011, 2012, it only performs currency translation for the year 2009.
Can I run the currency translation for multiple years at the same time ?
Note: The year is determined from the YEAR property of the "Time" dimension
appreciate any inputs,
thanksYou can run currency translation for multiple years.
I think the problem it is actually related to how you are sending the parameter to currency translation script.
Just review the script logic log and you will see with what parameters was called currency translation FXTrans.
My expectation is that actually the script is called just with first year and that's the problem.
Log of script logic you can find it into:
C:\BPC|DATA\Webfolder\YourAppset\YourApplication\Private Publications\Users used to run logic\Temp
Regards
Sorin Radulescu -
How can I implement the connection pool in my java stored procedure
my java stored procedures (in database 'B') have to connect to another oracle database ,let's say 'A'. And how can I implement the behavior like the so-called connection pool in my java stored procedure in 'B', as below.
1. database B, has 2 java stored procedures sp1 and sp2
2. both sp1 and sp2 connects to databse 'A'
whatever I call the sp1 and sp2 and the database 'A' always only one connected session from sp1 and sp2 in database 'B'.
THANKS A LOTS...my problem is I have a lots of java stored procedures need to cnnect to the remote oracle db, and I hope the remote db can only have a connected session from my java stored procedures in my local db. I try as below
class sp{
static Connection conn=null; //the remote db connection,
public static void sp1(){...}//procedure 1, using conn
public static void sp2(){...}//procedure 2, using conn,too
I can 'see' the 'conn' variable if I invoke the sp1() and sp2() from the same client application(maybe sqlplus). But if I invoke the sp1() from client 'A' and invoke sp2() from client 'B' then the sp1() and sp2() can not see the 'conn' variable for each other. I think it's because the two clients cause oracle to create two instances of the class 'sp' and the sp1() and sp2() located in different instance seperately. Thus the sp1() and sp2() can not see 'conn' for each other. They can only see its own 'conn'.
To connect to the remote db from the java stored procedure is easy but is it possible to connect to the remote db via database link from the java stored procedure at my local db ? If so, then I also archive my goal .
BTW , thanks a lots...
andrew :-) -
How can i Change the currency symbols for swiss francs?
Hi,
i use Numbers '09.
How can i change the currency symbol for swiss franks from SFr to CHF. Because the international ISO abbreviation is CHF and not SFr.
Thanks,
ByeSwitch to Lion.
I checked several currencies and now they are OK.
Yvan KOENIG (VALLAURIS, France) samedi 8 octobre 2011 23:24:26
iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0
My iDisk is : <http://public.me.com/koenigyvan>
Please : Search for questions similar to your own before submitting them to the community -
How can I -change the currency symbol from Pounds to Euros in a spreadsheet?
How can I change the currency symbol from Pounds to Euros in a spreadsheet?
Assuming davyfromGib is asking about AppleWorks rather than Pages . . .
If running AW under OS X, System Preferences settings allow you to use the euro rather than pound sign in AW's currency-formatted cells:
System Preferences > Language & Text > Formats > Currency (set to Euro)
AW respects this setting in choosing how to display currency format.
But do note that if you later change the System Preferences back to pounds, the currency-formatted cells in the AW spreadsheet will also change to pounds. -
How can I find the currency field of table KOMU
I need to select data from table KOMU, including field wrbtr. in 'Currency/Quantity Fields' tab, it's defined to use bkpf-waers.
but how can i find the corresponding record in bkpf? could anyone tell me the relation between these two table?
or is there another way to get the currency field?
thank you!Hi,
In that case, please retrieve the currency & store it in variable. Pass the variables to the Function Module.
CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
EXPORTING
date = syst-datum
foreign_amount = for_amount
foreign_currency = L_cur1
local_currency = l_cur2
IMPORTING
local_amount = loc_ammount
EXCEPTIONS
no_rate_found = 1
overflow = 2
no_factors_found = 3
no_spread_found = 4
derived_2_times = 5.
[Code]
Best regards,
Prashant
[code] -
HI folks,
i have a typical problem in bex .
my scenario is:i am having 2 values say 'x','y'.
i want to implement a formula like x-y.
if the x value is negative then i have to get the result as negative after the 'y' value get subtracted.if 'x' is positive, i have to get positive value after subtracting 'y' value.
please let me know how can i implement this scenario in bex.
by using a formaula or condition or anything else. please let me know clearly including the expression asap.
Best reagards,
ashok.answered
-
How can I implement the security ports..?
How can I use the security ports and SSL through javamail..?
Can someone tell me what are the necessary things to b done while connecting to "Gmail" through Javamail??....like how to authenticate..etc??
Edited by: shyamwdr on May 20, 2008 6:21 AMDid you read the FAQ?
-
WPF How can I implement the INotifyPropertyChanged in a Three-tier architecture?
I am a student and I am confused on using the INotifyPropertyChanged in a three-tier style of coding. Can you guys help me a bit with these?
I have a solution named MetroAppProject. It is composed of four projects (I omitted the using clauses and references, just imagine they are there and are working fine):
1. MetroApp.BluePrints - a class library composed of the classes in my sql db
An example of my class
namespace MetroApp.BluePrints
public partial class Patient
public long Id { get; set; }
public string PatientNumber { get; set; }
public string LastName { get; set; }
public string FirstName { get; set; }
public string MiddleName { get; set; }
public string AddressLine1 { get; set; }
public Nullable<short> CityId { get; set; }
public string CityName { get; set; }
public Nullable<short> ProvinceId { get; set; }
public string ProvinceName { get; set; }
Then the second project:
2. MetroApp.DataAccess = a class library composed of methods that calls my sql procedures. I used the SqlHelper class which contains the connection strings and other stuffs.
example class
namespace MetroApp.DataAccess
public class PatientDb
public Patient Retrieve(PatientParams parameters)
SqlCommand command = new SqlCommand();
Patient singItem = new Patient();
command.CommandText = "RetrievePatients";
command.CommandType = CommandType.StoredProcedure;
command.Parameters.AddWithValue("@Id", parameters.Id).Direction = ParameterDirection.Input;
DataTable dt = SqlHelper.GetData(command);
if (dt.Rows.Count > 0)
DataRow row = dt.Rows[0];
singItem.Id = TDefaultValue.GetInt(row["Id"].ToString());
singItem.PatientNumber = TDefaultValue.GetString(row["PatientNumber"].ToString());
singItem.LastName = TDefaultValue.GetString(row["LastName"].ToString());
singItem.FirstName = TDefaultValue.GetString(row["FirstName"].ToString());
singItem.MiddleName = TDefaultValue.GetString(row["MiddleName"].ToString());
singItem.AddressLine1 = TDefaultValue.GetString(row["AddressLine1"].ToString());
singItem.CityId = TDefaultValue.GetShort(row["CityId"].ToString());
singItem.CityName = TDefaultValue.GetString(row["CityName"].ToString());
singItem.ProvinceId = TDefaultValue.GetShort(row["ProvinceId"].ToString());
singItem.ProvinceName = TDefaultValue.GetString(row["ProvinceName"].ToString());
return singItem;
public List<Patient> RetrieveMany(PatientParams parameters)
var items = new List<Patient>();
var command = new SqlCommand();
command.CommandText = "RetrievePatients";
command.CommandType = CommandType.StoredProcedure;
command.Parameters.AddWithValue("@Id", parameters.Id).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@PatientNumber", parameters.PatientNumber).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@LastName", parameters.LastName).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@FirstName", parameters.FirstName).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@MiddleName", parameters.MiddleName).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@CityId", parameters.CityId).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@ProvinceId", parameters.ProvinceId).Direction = ParameterDirection.Input;
DataTable dt = SqlHelper.GetData(command);
foreach (DataRow row in dt.Rows)
var item = new Patient();
item.Id = TDefaultValue.GetLong(row["Id"].ToString());
item.PatientNumber = (row["PatientNumber"].ToString());
item.LastName = (row["LastName"].ToString());
item.FirstName = (row["FirstName"].ToString());
item.MiddleName = (row["MiddleName"].ToString());
item.AddressLine1 = (row["AddressLine1"].ToString());
item.CityId = (short)row["CityId"].ToString();
item.CityName = (row["CityName"].ToString());
item.ProvinceId = (short)row["ProvinceId"].ToString();
item.ProvinceName = (row["ProvinceName"].ToString());
items.Add(item);
return items;
public bool Insert(Patient entity, int userId, ref bool doesExist)
var command = new SqlCommand();
try
command.CommandText = "AddPatient";
command.CommandType = CommandType.StoredProcedure;
command.Parameters.AddWithValue("@PatientNumber", entity.PatientNumber).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@LastName", entity.LastName).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@FirstName", entity.FirstName).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@MiddleName", entity.MiddleName).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@AddressLine1", entity.AddressLine1).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@CityId", entity.CityId).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@ProvinceId", entity.ProvinceId).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@Id", entity.Id).Direction = ParameterDirection.Input;
command.Parameters.Add("@DoesExist", SqlDbType.Bit).Direction = ParameterDirection.Output;
int result = SqlHelper.ExecuteNonQuery(command);
doesExist = (bool)(command.Parameters["@DoesExist"].Value);
entity.Id = (int)(command.Parameters["@Id"].Value);
if (result == 0 || doesExist)
return false;
return true;
catch (Exception)
return false;
public bool Update(Patient entity, int userId, ref bool doesExist)
var command = new SqlCommand();
try
command.CommandText = "EditPatient";
command.CommandType = CommandType.StoredProcedure;
command.Parameters.AddWithValue("@PatientNumber", entity.PatientNumber).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@LastName", entity.LastName).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@FirstName", entity.FirstName).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@MiddleName", entity.MiddleName).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@AddressLine1", entity.AddressLine1).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@CityId", entity.CityId).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@ProvinceId", entity.ProvinceId).Direction = ParameterDirection.Input;
command.Parameters.AddWithValue("@Id", SqlDbType.Int).Direction = ParameterDirection.Output;
command.Parameters.Add("@DoesExist", SqlDbType.Bit).Direction = ParameterDirection.Output;
doesExist = (bool)(command.Parameters["@DoesExist"].Value);
int result = SqlHelper.ExecuteNonQuery(command);
if (result == 0 || doesExist)
return false;
return true;
catch (Exception)
return false;
Then a business logic
3. MetroApp.BusinessLogic = class libray for calling the methods from DataAccess
namespace MetroApp.BusinessLogic
public class PatientMgr
#region Fields
private readonly PatientDb _db;
#endregion
#region Properties
public Patient Entity { get; set; }
public List<Patient> EntityList { get; set; }
public PatientParams Parameters { get; set; }
#endregion
#region Constructors
public PatientMgr()
_db = new PatientDb();
Entity = new Patient();
EntityList = new List<Patient>();
Parameters = new PatientParams();
#endregion
#region Methods
public Patient Retrieve(PatientParams parameters)
return _db.Retrieve(parameters);
public List<Patient> RetrieveMany(PatientParams parameters)
return _db.RetrieveMany(parameters);
public bool Insert(Patient entity, int userId, ref bool doesExist)
return _db.Insert(entity, userId, ref doesExist);
public bool Update(Patient entity, int userId, ref bool doesExist)
return _db.Update(entity, userId, ref doesExist);
#endregion
Then the last one, the WPF GUI
<UserControl x:Class="MetroDentProject.Pages.PatientDetailsPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dims="clr-namespace:MetroAppProject.UserCons"
mc:Ignorable="d"
d:DesignHeight="720" d:DesignWidth="1280">
<Grid x:Name="MainGrid" >
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<GroupBox Grid.Column="0" Grid.Row="1" Grid.RowSpan="7" x:Name="DetailsGroupBox" Header="Patient Details" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Text="Id: " Grid.Column="1" Grid.Row="0" Visibility="Collapsed"/>
<TextBox x:Name="IdTextBox" Grid.Column="1" Grid.Row="1" Visibility="Collapsed"/>
<TextBlock x:Name="PatientNumberTextBlock" Text="Patient Number: " Grid.Column="0" Grid.Row="0" />
<TextBox x:Name="PatientNumberTextBox" Grid.Column="1" Grid.Row="0" IsReadOnly="True" IsReadOnlyCaretVisible="True"/>
<TextBlock Text="Last Name: " Grid.Column="0" Grid.Row="1" />
<TextBox x:Name="LastNameTextBox" Grid.Column="1" Grid.Row="1" />
<TextBlock Text="First Name: " Grid.Column="0" Grid.Row="2" />
<TextBox x:Name="FirstNameTextBox" Grid.Column="1" Grid.Row="2" />
<TextBlock Text="Middle Name: " Grid.Column="0" Grid.Row="3" />
<TextBox x:Name="MiddleNameTextBox" Grid.Column="1" Grid.Row="3" />
</Grid>
</GroupBox>
<GroupBox x:Name="ContactDetailsGroupBox" Header="Contact Details" Grid.Column="1" Grid.Row="1" Grid.RowSpan="7">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Text="Address: " Grid.Column="0" Grid.Row="0" Grid.RowSpan="2" />
<TextBlock Text="City: " Grid.Column="0" Grid.Row="2" />
<TextBlock Text="Province: " Grid.Column="0" Grid.Row="3"/>
<TextBox x:Name="AddressTextBox" Grid.Column="1" Grid.Row="0" Grid.RowSpan="2"
TextWrapping="Wrap"
AcceptsReturn="True"
VerticalScrollBarVisibility="Auto"
/>
<ComboBox x:Name="CitiesComboBox" Grid.Column="1" Grid.Row="2" />
<ComboBox x:Name="ProvincesComboBox" Grid.Column="1" Grid.Row="3" />
</Grid>
</GroupBox>
<dims:FunctionButtonsControl x:Name="FunctionButtonsCon" Grid.Row="9" Grid.Column="0" Grid.ColumnSpan="2"
ExecuteClick="FunctionButtonsCon_OnExecuteClick"
UndoClick="FunctionButtonsCon_OnUndoClick"
BackClick="FunctionButtonsCon_OnBackClick"
DeleteClick="FunctionButtonsCon_OnDeleteClick"
/>
</Grid>
</UserControl>
I apologize for the long post. As you can see, I don't use binding. Binding requires me to use INotifyPropertyChanged interface which I am not familiar. Can you at least make my project to implement the INotifypropertyChanged?
Here is my sample code for the WPF page:
public partial class PatientDetailsPage
readonly PatientMgr itemMgr = new PatientMgr();
public PatientParams CurrentPar = new PatientParams(); // for undoActionType _action = ActionType.Insert; // this is an enum from another project, ActionType.Insert, ActionType.Update
public ActionType Action
get { return _action; }
set { _action = value; }
public PatientDetailsPage()
InitializeComponent();
BindComboBoxes();
#region Methods
public void OnFragmentNavigation(FragmentNavigationEventArgs e)
public void OnNavigatedFrom(NavigationEventArgs e)
public void OnNavigatedTo(NavigationEventArgs e)
{ Setup();
public void OnNavigatingFrom(NavigatingCancelEventArgs e)
public Patient GetPageEntity()
Patient setEntity = new Patient();
setEntity.Id = (long)IdTextBox.Text;
setEntity.PatientNumber = PatientNumberTextBox.Text;
setEntity.LastName = LastNameTextBox.Text;
setEntity.FirstName = FirstNameTextBox.Text;
setEntity.MiddleName = MiddleNameTextBox.Text;
setEntity.AddressLine1 = AddressTextBox.Text;
setEntity.CityId = (short)CitiesComboBox.SelectedValue);
setEntity.ProvinceId = (short)ProvincesComboBox.SelectedValue;
setEntity.StatusId = true;
return setEntity;
public void Setup()
switch (Action)
case ActionType.Insert:
Clearer(); //clears all textboxes and set all comboboxes to default
this.PatientNumberTextBlock.Visibility = Visibility.Collapsed;
this.PatientNumberTextBox.Visibility = Visibility.Collapsed;
FunctionButtonsCon.ExecuteButton.Content = "Add";
FunctionButtonsCon.DeleteButton.IsEnabled = false;
FunctionButtonsCon.DeleteButton.Visibility = Visibility.Hidden;
break;
//**Setup Update
case ActionType.Update:CurrentPar.Id = (long)IdTextBox.Text;
LoadSingle(CurrentPar);
this.PatientNumberTextBlock.Visibility = Visibility.Visible;
this.PatientNumberTextBox.Visibility = Visibility.Visible;
FunctionButtonsCon.ExecuteButton.Content = "Save";
FunctionButtonsCon.DeleteButton.IsEnabled = true;
FunctionButtonsCon.DeleteButton.Visibility = Visibility.Visible;
break;
LastNameTextBox.CaretIndex = LastNameTextBox.Text.Length;
IsVisibleChanged += AutoFocus;
public void LoadSingle(PatientParams parameters)
var entity = itemMgr.Retrieve(parameters); //calls the BusinessLogic
IdTextBox.Text = (entity.Id);
PatientNumberTextBox.Text = (entity.PatientNumber);
LastNameTextBox.Text = (entity.LastName);
FirstNameTextBox.Text = (entity.FirstName);
MiddleNameTextBox.Text = (entity.MiddleName);
AddressTextBox.Text = (entity.AddressLine1);
CitiesComboBox.SelectedValue = (short)entity.CityId;
ProvincesComboBox.SelectedValue = (short)entity.ProvinceId;
public void Save(ActionType action, int userId)
itemMgr.Entity = GetPageEntity();
bool doesExist = false;
switch (action)
case ActionType.Insert:
if (itemMgr.Insert((itemMgr.Entity), userId, ref doesExist))
System.Windows.Forms.MessageBox.Show("Successfully added a Patient!", "Patient Insertion");
else if (doesExist)
System.Windows.Forms.MessageBox.Show("Item already exists.", "Patient Insertion");
else
System.Windows.Forms.MessageBox.Show("Not all fields were filled in.", "Patient Insertion");
break;
case ActionType.Update:
if (itemMgr.Update(itemMgr.Entity, userId, ref doesExist))
System.Windows.Forms.MessageBox.Show("Successfully updated a Patient!", "Patient Modification");
itemMgr.Parameters.Id = itemMgr.Entity.Id;
Action = ActionType.Update;
Setup();
else if (doesExist)
System.Windows.Forms.MessageBox.Show("Item already exists.", "Patient Modification");
else
System.Windows.Forms.MessageBox.Show("Not all fields were filled in.", "Patient Modification");
break;
public void Clearer()
IdTextBox.Clear();
PatientNumberTextBox.Clear();
LastNameTextBox.Clear();
FirstNameTextBox.Clear();
MiddleNameTextBox.Clear();
CitiesComboBox.SelectedIndex = 0;
ProvincesComboBox.SelectedIndex = 0;
AddressTextBox.Clear();
public void BindComboBoxes()
CitiesComboBox.ItemsSource = new BindingSource(CommonMgr.GetCitiesDropDown(), null);// the CommonMgr is a static class from another project. It works just fine
CitiesComboBox.DisplayMemberPath = "Value";
CitiesComboBox.SelectedValuePath = "Key";
ProvincesComboBox.ItemsSource = new BindingSource(CommonMgr.GetProvincesDropDown(), null);
ProvincesComboBox.DisplayMemberPath = "Value";
ProvincesComboBox.SelectedValuePath = "Key";
CitiesComboBox.SelectedIndex = 0;
ProvincesComboBox.SelectedIndex = 0;
#endregion
#region Events
private void FunctionButtonsCon_OnExecuteClick(object sender, RoutedEventArgs e)
Save(Action, SessionHelper.MyUser.Id); //SessionHelper.MyUser.Id
private void FunctionButtonsCon_OnUndoClick(object sender, RoutedEventArgs e)
if (Action == ActionType.Insert)
Clearer();
return;
private void FunctionButtonsCon_OnBackClick(object sender, RoutedEventArgs e)
Exiter();
private void FunctionButtonsCon_OnDeleteClick(object sender, RoutedEventArgs e)
var ans = System.Windows.Forms.MessageBox.Show("Are you sure you want to delete this entry?", "Patient Deletion", MessageBoxButtons.YesNo);
if (!Equals(ans, System.Windows.Forms.DialogResult.Yes)) return;
Action = ActionType.Delete;
Save(Action, SessionHelper.MyUser.Id);
Exiter();
#endregionHello Kokombads,
I thought you are using MVVM from your title but it seems your project is just a simple WPF project. In that way, please check the following msdn article to know how to Implement Property Change Notification
https://msdn.microsoft.com/en-us/library/ms743695(v=vs.110).aspx
using System.ComponentModel;
namespace SDKSample
// This class implements INotifyPropertyChanged
// to support one-way and two-way bindings
// (such that the UI element updates when the source
// has been changed dynamically)
public class Person : INotifyPropertyChanged
private string name;
// Declare the event
public event PropertyChangedEventHandler PropertyChanged;
public Person()
public Person(string value)
this.name = value;
public string PersonName
get { return name; }
set
name = value;
// Call OnPropertyChanged whenever the property is updated
OnPropertyChanged("PersonName");
// Create the OnPropertyChanged method to raise the event
protected void OnPropertyChanged(string name)
PropertyChangedEventHandler handler = PropertyChanged;
if (handler != null)
handler(this, new PropertyChangedEventArgs(name));
It is not so complex, you only need to refer to the interface from here:
https://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged(v=vs.110).aspx
And understand that you have to do the following:
For change notification to occur in a binding between a bound client and a data source, your bound type should either:
Implement the INotifyPropertyChanged interface (preferred).
Provide a change event for each property of the bound type
Best regards,
Barry
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
How can i implement the default value for this variable?
In one of our Stored procs,we have a variable RECS_TO_DELETE, which determines the number of records to delete from various DELETEs that happen within this proc.
The value for RECS_TO_DELETE variable should be obtained from a configuration table sys_config
select
rec_num into RECS_TO_DELETE
from sys_config
where
sys_code=55;
But if something goes wrong with sys_config table or the above SELECT INTO, our client wants to makes sure that RECS_TO_DELETE should have a default value of 1000.
In the code, how will i implement having this default value of 1000 for RECS_TO_DELETE variable in case the above SELECT INTO fails for some reason.Hi,
You have to assign a value before the execution...
DECLARE
RECS_TO_DELETE NUMBER(9) := 1000;
BEGIN
SELECT rec_num
INTO RECS_TO_DELETE
FROM sys_config
WHERE sys_code = 55;
DBMS_OUTPUT.put_line(RECS_TO_DELETE);
EXCEPTION
WHEN NO_DATA_FOUND THEN
DBMS_OUTPUT.put_line(RECS_TO_DELETE);
END;
/Regards, -
How can i view the full text of a query??
I must view the full text of several queries. I use the v$sqltext and v$sql, but i can´t view the full text.
Do you know any method to do this??
Thanks a lot!set serveroutput on size 50000
set linesize 1000
set echo off feed off veri off
accept 1 prompt 'Enter Sql ID: '
set serverout on size 1000000
declare
my_var long;
begin
for x in ( select sql_fulltext from v$sqlarea where sql_id = '&1')
loop
my_var := dbms_lob.substr( x.sql_fulltext, 32000, 1 );
dbms_output.put_line(my_var);
end loop;
end;
/ -
How can I get the same result using single query?
There are 3 tables
1) tool_desc -
a master table for storing tool records,
columns tool_no, tool_chg,
# of records = 1.5 Millon
2) step_desc -
a master table for storing plan wise step records,
columns plan_id, step_key,
# of records = 3700 Million
3) step_tool - a transaction table storing tools to the steps,
columns plan_id, step_key, tool_no, tool_chg
For each step in the step_desc table, I need to randomly fetch 1 to 50 tools from tool_desc and insert them into step_tool table.
Using PL/SQL block, it is like the following -
begin
for x in (select plan_id, step_key from step_desc) loop
insert into step_tool(
plan_id,
step_key,
tool_no,
tool_chg)
select
plan_id,
x.step_key,
tool_no,
tool_chg
from
tool sample(0.1)
where
rownum <= trunc(dbms_random.value(1,51))
commit;
end loop;
end;
I need to do the same using a single query so that I can use the CTAS (create table as select) statement and load the data as a bulk.
Can I do that?If they have parent child releation, you can use connect by prior clause,
-
How can i see the values of a prepared query
Somebody knows about a tool that show me the values of a prepared query.
I tried with the view V$SQL and with the TKPROF, but both show me the same query text and i need to know the parameter's values. Example of a prepared query - I don't know if it is the correct name of that kind of query.
UPDATE "CL0E01" SET "BLOQUEO"=:1
WHERE
"CLAVE"=:2 AND "NUM_REGS"=:3 AND "ULT_CLV"=:4 AND "BLOQUEO"=:5
Is it a tool that show me the value??
Thanks for the help.
Roberto MorenoI tried with the view V$SQL_BIND_CAPTURE but i get this error. "ORA-00932: inconsistent datatypes: expected CHAR got -". I executed in the Application Express.
What could be wrong??
I put my STATISTICS_LEVEL to ALL but nothing happen. I recieved the same result.
I executed the view V$STATISTICS_LEVEL, for the Bind Data Capture I have enabled the session and system status, the activation level is TYPICAL.
Thanks for your help TongucY -
How can I implement the equivilent of a temporary table with "on commit delete rows"?
hi,
I have triggers on several tables. During a transaction, I need to gather information from all of them, and once one of the triggers has all the information, it creates some data. I Can't rely on the order of the triggers.
In Oracle and DB2, I'm using temporary tables with "ON COMMIT DELETE ROWS" to gather the information - They fit perfectly to the situation since I don't want any information to be passed between different transactions.
In SQL Server, there are local temporary tables and global. Local temp tables don't work for me since apparently they get deleted at the end of the trigger. Global tables keep the data between transactions.
I could use global tables and add some field that identifies the transaction, and in each access to these tables join by this field, but didn't find how to get some unique identifier for the transaction. @@SPID is the session, and sys.dm_tran_current_transaction
is not accessible by the user I'm supposed to work with.
Also with global tables, I can't just wipe data when "operation is done" since at the triggers level I cannot identify when the operation was done, transaction was committed and no other triggers are expected to fire.
Any idea which construct I could use to acheive the above - passing information between different triggers in the same transaction, while keeping the data visible to the current transaction?
(I saw similar questions but didn't see an adequate answer, sorry if posting something that was already asked).
Thanks!This is the scenario: If changes (CRUD) happen to both TableA and TableB, then log some info to TableC. Logic looks something like this:
Create Trigger TableA_C After Insert on TableA {
If info in temp tables available from TableB
Write info to TableC
else
Write to temp tables info from TableA
Create Trigger TableB_C After Insert on TableB {
If info in temp tables available from TableA
Write info to TableC
else
Write to temp tables info from TableB
So each trigger needs info from the other table, and once everything is available, info to TableC is written. Info is only from the current transaction.
Order of the triggers is not defined. Also there's no gurantee that both triggers would fire - changes can happen only to TableA / B and in that case I don't want to write anything to TableC.
The part that gets and sets info to temp table is implemented as temp tables with "on commit delete rows" in DB2 / Oracle.
What do you think? As I've mentioned, I could use global temp tables with a field that would identify the transaction, but didn't find something like that in SQL Server. And, the lifespan of local temp tables is too short. -
How can i implement the event-dependent sequential operation of devices?
I am trying to develop a code to automate the valve operations of a gas plumbing system. for example, i would like to select "leak test" from an enumerated list and then have the system open some valves (digital output), wait for user confirmation, open more valves, activate compressor, wait for certain pressure (analog input), close certain valves, continue compressing untill certain pressure, stop compressing, wait 60 minutes while logging pressure readings. That is basically what i'm trying to implement. i am stuck on how to carry this out. i already have somewhat of a state machine built, my trouble is with the structure of how to build the sequence. I know this is probably vague, i'll answer any questions anyone has. Thank you very much.
BrianTake a look at a Queued State Machine. Here you build a list of the order of steps to take. It could either an array where at the end of each step, it picks off the next item on the array. Or it could actually be a queue. The next state to operate gets picked off the queue. You would preload the queue with all of your desired steps. On each iteration, it would dequeue the next state to do. In the cases where you need to repeat a step (such as continually doing a step until a condition as been met) you would re-enqueue the same step at the front of the queue.
Maybe you are looking for
-
Making a Dynamic, Query-able .swf
Hello, I'll direct your attention to ID software's homepage, http://idsoftware.com. You can see by looking at the source that each blog entry headline is a reference to an .swf file with a query. For example: http://www.idsoftware.com/ie-header.swf?p
-
no puedo importar videos porque dice que photoshop no admite videos en mi version de windows (windows 7) QUE HAGO???
-
hi could any body tel me pricing procedure in sap............
-
Forgot my security questions how to reset
how do i reset my security questions as i do not remember what was set up
-
Running SQL Loader through PL/SQL
Hi All, Is there a utility package that can be used to run SQL LOADER through PL/SQL? Regards