How update xellerate form data from Action class
Hi Experts,
i did some customization in Action class.
Now from this Action class i want toupdate xellerate from data
Using digital signature i got the status of one of the attribute of xellerate from
ie
userIntf = (tcUserOperationsIntf)utilityFactory.getUtility("Thor.API.Operations.tcUserOperationsIntf");
tcResultSet tRs = userIntf.findAllUsers(userMap);
if(tRs.getRowCount() > 0)
userLoginStatus= tRs.getBooleanValue("USR_UDF_IS_FIRST_LOGON");
now i want update this attribute, ie ifuserLoginStatus is true, i want to update as false
help me how to achive this..
thanks
How to update userdata using OIM API
Thanks
Similar Messages
-
How to copy form data from one pdf to another?
Hi,
I have created a pdf, added form data to it. Saved the form data as a fdf file - all good.
I've updated the document and saved as a new pdf and would like to load the fdf data into it.
So I select tools - forms - more forms options, and press the "import" function - it goes grey and nothing happens.
If I re-open the document the import function remains greyed out.
I can find no way to import this data.... any ideas?
I've tried going into form edit mode - adding a new field. The import option is no longer greyed out so I click it and can select the fdf file hit open and ... the dialogue disappears and nothing happens.
Is my Acrobat XI 11.0.07 badly installed - or what?You need to learn about the different types of PDFs. PDF/ A is an archive format that does not allow changes. PDF/X is used for graphics exchange
For forms I would use only the PDF with a target version. Do not use the Optimizer feature.
Forms always become larger due to the need to include the font for the various form fields. You might have to review the type fonts used by the form fields and one standard font as much a possible.
It is possible to use the FDF file to move field values from one PDF to another.
If you are trying to replace the underlying content and keep the form fields, use the replace pages. -
How to access form objects from different class?
Hello, I am new to java and i started with netbeans 6 beta,
when i create java form application from template i get 2 classes one ends with APP and one with VIEW,
i put for example jTextField1 with the form designer to the form and i can manipulate it's contents easily from within it's class (let's say it is MyAppView).
Question>
How can i access jTextField1 value from different class that i created in the same project?
please help. and sorry for such newbie question.
Thanks Mikehmm now it says
non static variable jTree1 can not be referenced from static context
My code in ClasWithFormObjects is
public static void setTreeModel (DefaultMutableTreeNode treemodel){
jTree1.setModel(new DefaultTreeModel(treemodel));
and in Class2 it is
ClasWithFormObjects.setTreeModel(model); -
Instead of using session How to pass the variable from action class to JSP
Im using Struts1.2 version.Created the Sample application to get the username.Upto action class im getting the username then i have to display the username in the JSP.Is there any options rather than using session variable to display the username.
did you check the answer in your previous thread
Passing Variable from Javascript to Controller -
How do I access data from another class?
I have a class RailNetwork which extends Datastore. DataStore contains a vector filelines which I need to access from RailNetwork. How do I do this? What do I put infront of filelines.get(i); ?
public abstract class DataStore
{ Vector<String> fileLines = new Vector<String>(); }
public class RailNetwork extends DataStore
{ ...main(){ .......filelines.get(i);....... }
}This is the code from RailNetwork class:
public static void main(String[] args) {
String templine;
int i = 0;
int vectorlength = super.filelines.size();
for( i = 0 ; i < vectorlength ; i++ )
templine = (String) super.filelines.get(i);
setStations(templine); }The errors (for both lines, only 1 shown):
RailNetwork.java:49: non-static variable super cannot be referenced from a static context
templine = (String) super.filelines.get(i);
^
RailNetwork.java:49: cannot find symbol
symbol : variable filelines
location: class DataStore
templine = (String) super.filelines.get(i);
^ -
How to Pass the data from the class to the BSP application(ie. .html page)
hi
i had created one .html page. This page is getting opened after clicking on one of the buttton of the toolbar(say Bank Data).
Now the problem is , to show the data of the bank which user had entered in the PCUI application on the .html page.
Please help me to solve the problemThanks for your answer, I tried the solution 2, I create "Submit" button, and ser the mapping scope to be "All data rows", it only works when I select at least one row, otherwise the data would not be passed.
Another question is I have serveral imported table parameter, for each table I have one "submit" event, I want these tables to be submitted at the same time, but if I click the submit button in one table toolbar, I can only submit the table data which has a submit button clicked, for other tables, the data is not passed, how can I achieve it?
Thanks. -
Send form data from Java class
Hi Guys,
Is it possible to send data using a Java class to a URL?
ThanksYes, but XML has nothing at all to do with that. Google for "java url tutorial".
-
Struts - Data pass from Action class to JSP
hello ,
I am new to struts and have a strange question in my mind .
How do we pass business logic data from action class to JSP.Do we use session object or any other best way to be used to pass data.
Example scenario:
Once the user logins into application by passing userid and password ,we need to display his open queries (from database table) on jsp.
Components used :
Login.jsp
LoginForm(getter and setter methods of userid & password)
LoginAction(get database connection,perform query to fetch user's open queries form the database)
OpenQueries.jsp(to display Open queries on a tabular format)
In LoginAction - We fetched user's open Queries from the database and stored them in collection object .
My question is : what is the best way to pass Collection object from LoginAction to OpenQueries.jsp ?
Thanks in advance...
Ram
Edited by: ram_76uk on Apr 10, 2008 8:21 PMYou can use plain javabeans to transfer the data. Check out the jsp:usebean tag. If you don't know how to do, check out the Java EE tutorial: http://java.sun.com/javaee/5/docs/tutorial/doc/ Using javabeans in JSP pages starts halfway chapter 4.
-
How can I pass data from a form guide to another form in a business process
How do we pass data from a form guide to another form(not necessarily a guide) without having to open the form. For example we have a small form guide to capture the contract id so we can then get data from contracts table to present to the user in a form. We want the user to open the guide (either Flex guide or form guide) to enter the contract id. Upon submission we want the process to get the contract data and put it into the form that will be opened at the next step by the user without having a user interact with the form to get the data into it. In other words we need the process to get the data and populate a different form than the form guide the contract id was entered in and this new form needs to be opened in the next step by the user.
Firstly, I'm assuming that you have a Forms ES Server if you are rendering a Guide. This could be either version ES1, ES2/2.5 or ES3/ADEP
If you submit the form back to the server, you can populate a second (PDF/XDP) form with the data bound to the same schema/Data Model using Forms ES.
You referred to the next user in the chain - If you are using Process Management, this is very easy, as you define what form is used to render the data in the "Presentation & Data" section of the Assign Task activity -
How to load the data from excel file into temprory table in Forms 11g?
Hi
How to Load the data from excel file(Extension is .CSV) into the temporary table of oracle in Forms11g.
My Forms Version is - Forms [64 Bit] Version 11.1.2.0.0 (Production)
Kindly Suggest the Solution.
Regards,
SachinDeclare
v_full_filename varchar2(500);
v_server_path varchar2(2000);
v_separator VARCHAR2(1);
v_filename VARCHAR2(400);
filename VARCHAR2 (100);
v_stop_load varchar2 (2000);
v_rec_error_log varchar2(4000);
v_error_log varchar2(4000);
ctr NUMBER (12);
cols NUMBER (2);
btn number;
RES BOOLEAN;
application ole2.obj_type;
workbooks ole2.obj_type;
workbook ole2.obj_type;
worksheets ole2.obj_type;
worksheet ole2.obj_type;
cell ole2.obj_type;
cellType ole2.OBJ_TYPE;
args ole2.obj_type;
PROCEDURE olearg
IS
args ole2.obj_type;
BEGIN
args := ole2.create_arglist;
ole2.add_arg (args, ctr);
ole2.add_arg (args, cols);
cell := ole2.get_obj_property (worksheet, 'Cells', args);
ole2.destroy_arglist (args);
END;
BEGIN
v_full_filename := client_get_file_name(directory_name => null
,file_name => null
,file_filter => 'Excel files (*.xls)|*.xls|'
||'Excel files (*.xlsx)|*.xlsx|'
,message => 'Choose Excel file'
,dialog_type => null
,select_file => null
If v_full_filename is not null Then
v_separator := WEBUTIL_CLIENTINFO.Get_file_Separator ;
v_filename := v_separator||v_full_filename ;
:LOAD_FILE_NAME := substr(v_filename,instr(v_filename,v_separator,-1) + 1);
RES := Webutil_File_Transfer.Client_To_AS(v_full_filename,"server_path"||substr(v_filename,instr(v_filename,v_separator,-1) + 1));
--Begin load data from EXCEL
BEGIN
filename := v_server_path||substr(v_filename,instr(v_filename,v_separator,-1) + 1); -- to pick the file
application := ole2.create_obj ('Excel.Application');
ole2.set_property (application, 'Visible', 'false');
workbooks := ole2.get_obj_property (application, 'Workbooks');
args := ole2.create_arglist;
ole2.add_arg (args, filename); -- file path and name
workbook := ole2.get_obj_property(workbooks,'Open',args);
ole2.destroy_arglist (args);
args := ole2.create_arglist;
ole2.add_arg (args, 'Sheet1');
worksheet := ole2.get_obj_property (workbook, 'Worksheets', args);
ole2.destroy_arglist (args);
ctr := 2; --row number
cols := 1; -- column number
go_block('xxx');
FIRST_RECORD;
LOOP
--Column 1 VALUE --------------------------------------------------------------------
olearg;
v_stop_load := ole2.get_char_property (cell, 'Text'); --cell value of the argument
:item1 := v_stop_load;
cols := cols + 1;
--Column 2 VALUE --------------------------------------------------------------------
olearg;
:item2 := ole2.get_char_property (cell, 'Text'); --cell value of the argument
cols := cols + 1;
--<and so on>
ole2.invoke (application, 'Quit');
ole2.RELEASE_OBJ (cell);
ole2.RELEASE_OBJ (worksheet);
ole2.RELEASE_OBJ (worksheets);
ole2.RELEASE_OBJ (workbook);
ole2.RELEASE_OBJ (workbooks);
ole2.RELEASE_OBJ (application);
END;
--End load data from EXCELPlease mark it as answered if you helped. -
How we can populate the form data from 2D barcode
Hi All,
Can anyone tell me how we can populate the form data from 2D barcode, will this can be done through script(javascript)?.
Thanks & Regards,
Faisal AfzalI was hoping someone could put me in the right direction here. I am basically doing the same . I am decodeing the information stored in a 2D Bar code and sending this information to an XML file, then I am trying to combine that xml file with a blank PDF template but the process is failing beacuse there are some additional tag fields the XML data from the Decode->Extract XML process.
The XML file from the decode process gives the structure below..notice therer some extra tags (lines 2- 4)
<?xml version="1.0" encoding="UTF-8"?>
<xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">
<xfa:datasets>
<xfa:data>
<form1>
The XML structure that is expected by the PDF template is as follows
<?xml version="1.0" encoding="UTF-8"?>
<form1>
So the xml output of the Decode barcode + Extract XML process has three extra lines of tag. Is there a way I could use a process within liveCycle to clean out those three lines in real-time before sending the xml to be recombined with the PDF template.
Thanks -
How do i parse data from the second jframe back to the first?
Hello.
I have a jFrame were I promt users to keep a list of Names in a jTable. (I keep data for something else, but lets say names.. ) Anyway, afterwords I want to add some extra parameters for each name. So I created a new frame, which is opened when user press an Edit button. The new frame opens and users can add for the specific name some extra data, like age, height, color, sex.. etc. that characterizes this person.
On this second form i have a save button, which when its pressed i would like to keep this information for this name, so as when user press edit again from the first frame on the same Name the data that previously entered will be loaded (lets say that the user can not enter the say name again)
I haven' t figured the code for the save Button, but with the rest I am fine.
Can you give any ideas with structures that I have to use and how the action listener will have to be??
When I set visible the new form i have made a constructor that loads the new form which have a label with the name of the person that is edited., but how do i parse data from the second form back to the first that is already opened??
Thanks very much..I found it.. it was not so hard afterall..
anyway, i quote the new code..
package namelist;
// Java core packages
import java.awt.event.*;
import java.util.*;
// Java extension packages
import javax.swing.*;
import javax.swing.table.*;
public class NamesGUI extends javax.swing.JFrame {
//Variables for managing the jTables
DefaultTableModel tableModel;
Vector rows,cols;
String[] colName1 = {"List of Names"};
ManageJTables mJT = new ManageJTables();
Hashtable h;
/** Creates new form ProsAgentGUI */
public NamesGUI() {
h = new Hashtable();
initComponents();
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
private void initComponents() {
Panel = new javax.swing.JPanel();
ToolBar = new javax.swing.JToolBar();
ADD = new javax.swing.JButton();
EDIT = new javax.swing.JButton();
REMOVE = new javax.swing.JButton();
jButton1 = new javax.swing.JButton();
TScrollPane = new javax.swing.JScrollPane();
Table = new javax.swing.JTable();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Names");
setBackground(new java.awt.Color(0, 51, 51));
Panel.setBorder(javax.swing.BorderFactory.createTitledBorder("List of Names"));
ToolBar.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
ADD.setText("ADD");
ADD.setToolTipText("");
ADD.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
ADD.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ADDActionPerformed(evt);
ToolBar.add(ADD);
EDIT.setText("EDIT");
EDIT.setToolTipText("");
EDIT.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
EDIT.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
EDITActionPerformed(evt);
ToolBar.add(EDIT);
REMOVE.setText("REMOVE");
REMOVE.setToolTipText("");
REMOVE.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
REMOVE.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
REMOVEActionPerformed(evt);
ToolBar.add(REMOVE);
jButton1.setText("jButton1");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
ToolBar.add(jButton1);
rows=new Vector();
cols= new Vector();
cols=mJT.addColumns(colName1, cols);
tableModel =new DefaultTableModel();
tableModel.setDataVector(rows,cols);
Table.setModel(tableModel);
TScrollPane.setViewportView(Table);
org.jdesktop.layout.GroupLayout PanelLayout = new org.jdesktop.layout.GroupLayout(Panel);
Panel.setLayout(PanelLayout);
PanelLayout.setHorizontalGroup(
PanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(ToolBar, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 210, Short.MAX_VALUE)
.add(TScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 210, Short.MAX_VALUE)
PanelLayout.setVerticalGroup(
PanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(PanelLayout.createSequentialGroup()
.add(ToolBar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 34, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(TScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 159, Short.MAX_VALUE))
org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(Panel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
layout.setVerticalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
.addContainerGap(29, Short.MAX_VALUE)
.add(Panel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
pack();
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
System.out.println(h.toString());
public void updateNamesTable (int id, String na){
Integer i2 = new Integer(id);
Object o2 = (Object)i2;
if (h.containsKey(o2)){
Name a = (Name)h.get(o2);
a.name = na;
h.put(o2,a);
else {
Name aa = new Name();
aa.name=na;
h.put(o2,(Object)aa);
private void EDITActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
String name = Table.getValueAt(Table.getSelectedRow(),0).toString();
int rowNum= Table.getSelectedRow();
Integer i = new Integer(rowNum);
Object o = (Object)i;
updateNamesTable (rowNum, name);
//public NameEditor(Name n, Hashtable h, int id)
NameEditor re = new NameEditor((Name)h.get(o), h, rowNum );
re.setVisible(true);
private void REMOVEActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
mJT.deleteRow(Table.getSelectedRow(), rows, Table);
private void ADDActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
mJT.addRow(rows, Table);
* @param args the command line arguments
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new NamesGUI().setVisible(true);
// Variables declaration - do not modify
javax.swing.JButton ADD;
javax.swing.JButton EDIT;
javax.swing.JPanel Panel;
javax.swing.JButton REMOVE;
javax.swing.JScrollPane TScrollPane;
javax.swing.JTable Table;
javax.swing.JToolBar ToolBar;
javax.swing.JButton jButton1;
// End of variables declaration
public class NameEditor extends javax.swing.JFrame {
Hashtable h;
Name n;
int id;
/** Creates new form NameEditor */
public NameEditor() {
initComponents();
public NameEditor(Name n, Hashtable h, int id) {
this.h=h;
this.n=n;
this.id=id;
initComponents();
NameField.setText(n.name);
jTextField2.setText(n.weight);
jTextField1.setText(n.height);
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
private void initComponents() {
NameLabel = new javax.swing.JLabel();
NameField = new javax.swing.JTextField();
SaveBut = new javax.swing.JButton();
jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jTextField1 = new javax.swing.JTextField();
jTextField2 = new javax.swing.JTextField();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Name Editor");
getAccessibleContext().setAccessibleName("Name Editor");
NameLabel.setText("Name: ");
NameField.setEditable(false);
NameField.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
NameFieldActionPerformed(evt);
SaveBut.setText("SAVE");
SaveBut.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
SaveButActionPerformed(evt);
jLabel3.setText("Height");
jLabel4.setText("Weight");
org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(layout.createSequentialGroup()
.addContainerGap()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(jLabel4)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED))
.add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jLabel3)
.add(NameLabel))
.add(16, 16, 16)))
.add(17, 17, 17)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(NameField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 138, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
.add(org.jdesktop.layout.GroupLayout.LEADING, jTextField2)
.add(org.jdesktop.layout.GroupLayout.LEADING, jTextField1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 46, Short.MAX_VALUE))))
.add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
.add(127, 127, 127)
.add(SaveBut)))
.addContainerGap())
layout.setVerticalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.addContainerGap()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(NameLabel)
.add(NameField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(30, 30, 30)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel3)
.add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(12, 12, 12)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel4)
.add(jTextField2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 27, Short.MAX_VALUE)
.add(SaveBut)
.addContainerGap())
pack();
public void updateNameTable (){
Integer i2 = new Integer(id);
Object o2 = (Object)i2;
h.put(o2,n);
private void SaveButActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
n.height= jTextField1.getText();
n.weight = jTextField2.getText();
private void NameFieldActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
* @param args the command line arguments
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new NameEditor().setVisible(true);
// Variables declaration - do not modify
javax.swing.JTextField NameField;
javax.swing.JLabel NameLabel;
javax.swing.JButton SaveBut;
javax.swing.JLabel jLabel3;
javax.swing.JLabel jLabel4;
javax.swing.JTextField jTextField1;
javax.swing.JTextField jTextField2;
// End of variables declaration
} -
Hi guys,
I have created a copy of the AdventureWorks2012 DB called AdventureWorks2012_new on the same instance.
I have created the following trigger below but my friend who is a DBA told me that this is not correct and I should be using the inserted table when creating this trigger. I would like AdventureWorks2012_new DB to be updating/inserting/deleting data from
the same tables that have been updated/inserted/deleted in the AdventureWorks2012 DB. How exactly should I do this for all the tables in the whole database ? What I have written below is just for one of the tables, is there a quicker way to do it for all tables
in this DB so that it performs the actions mentioned above, automatically ? Help would be greatly appreciated so I can understand how this works, thanks
CREATE TRIGGER [HumanResources].[tr_HumanResources_AfterUpdate]
ON [AdventureWorks2012].[HumanResources].[Department]
AFTER UPDATE
AS
BEGIN
SET NOCOUNT ON;
UPDATE AdventureWorks2012_new.HumanResources.Department
SET Name = t2.Name,
GroupName = t2.GroupName,
ModifiedDate = t2.ModifiedDate
FROM AdventureWorks2012.HumanResources.Department AS t2
INNER JOIN AdventureWorks2012_new.HumanResources.Department AS t1
ON t2.DepartmentID = t1.DepartmentID
ENDFor insert it's easy:
CREATE TRIGGER [HumanResources].[tr_HumanResources_AfterInsert]
ON [AdventureWorks2012].[HumanResources].[Department]
AFTER INSERT
AS
BEGIN
SET NOCOUNT ON;
Insert INTO AdventureWorks2012_new.HumanResources.Department
(DepartmentID, Name, GroupName, ModifiedDate)
SELECT DepartmentID, Name, GroupName, ModifiedDate
FROM Inserted;
END
I didn't verify column names, so you may need to make sure to use correct column names for that table.
Setting replication is a bit advanced topic although BOL is clear and you may start here
http://technet.microsoft.com/en-us/library/ms151198.aspx
If it will be complicated for you, you can ask extra questions in the MSDN Replication forum.
For every expert, there is an equal and opposite expert. - Becker's Law
My blog
My TechNet articles -
How can I Move data from one column to another in my access table?
I have two columns, one that stores current month’s data and one that stores last month’s data. Every month data from column 2 (this month’s data) needs to be moved to column 1 that holds last month’s data. I then null out column 2 so I can accumulates this month’s data.
I understand how to drop a column or add a column, how do I transfer data from one column to another.
Here is my trial code:
<cfquery name="qQueryChangeColumnName" datasource="#dsn#">
ALTER TABLE leaderboard
UPDATE leaderboard SET points2 = points3
</cfquery>
Unfortunately, I get the following error:
Error Executing Database Query.
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in ALTER TABLE statement.
How can I transfer my data with the alter table method?I looked up the Access SQL reference (which is probably a
good place to start when having issues with Access SQL), and
it suggests you probably need a WHERE clause in there.
I agree the documentation is a good place to start. But you should not need a WHERE clause here.
Too few parameters. Expected 1.
If you run the SQL directly in Access, what are the results? At the very least, it should provide a more informative error message.. -
How do i transfer data from one internal tabe to another.
Hi All,
How do i transfer data from one internal tabe to another.
Can i do it ebven if he tables are different in structure.
Please Advice.
Thanks in advance.Hi Saket Tiwari,
I hope the earlier post by kashyap is good enough an answer. anywas in addition to it let me give a detailed
explanation of how you can populate an internal table.
1) Append data line by line.
Syntax : APPEND [<wa> TO / INITIAL LINE TO] <itab>.
this appends new line to internal table <itab>.
2) Using COLLECT statement.
COLLECT is another form of statement used for populating the internal tables. Generally COLLECT is used while inserting lines into an internal table with unique standard key. The syntax for COLLECT statement is as shown
Syntax : COLLECT [<wa> INTO] <itab>.
3) Using INSERT statement
Syntax INSERT [<wa> INTO / INITIAL LINE INTO] <itab> [index <idx>].
INSERT statement adds a line/work area to the internal table. You can specify the position at which the new line is to be added by using the INDEX clause with the INSERT statement.
Now coming to your request..
To append part or all of an internal table
Syntax
APPEND LINES OF <itab1> [FROM <n1>] [TO <n2>] TO <itab2>.
* Note:
Without the FROM and TO options, this statement appends the entire table <itab1> to <itab2>.*
b) To insert part or all of an internal table into another internal table
Syntax
INSERT LINES OF <itab1> [FROM <n1>] [TO <n2>]
INTO <itab2> [INDEX <idx>].
c) Using Move statement.
To copy entire contents of one table into another in one execution
Syntax MOVE <itab1> To <itab2>.
OR
<itab1> = <itab2>.
but u hav to be careful because he contents of itab2 will eb overwritten on the execution of this statement.
These copy the contents of ITAB1 to ITAB2. Incase of internal tables with header line we have to use [] inorder to distinguish from work area. So, to copy contents of internal tables with header line the syntax becomes,
ITAB1[] = ITAB2[].
Coming to the letter part of your question, Yes, we can copy values between tables having different structures.
for this we use
MOVE-CORRESPONDING <itab1> TO <itab2>
this executes the statement for their header lines. Searches for the sub-fields which occur both in itab1 and itab2 and then generates, for all relevant field pairs which correspond to the
sub-fields ni , statements of the form MOVE itab1-ni TO itab2-ni. The other fields remain unchanged.
I hope the information provided has been of your help.
Reward if useful.
Regards,
Jose
Maybe you are looking for
-
Data mismatch between Cube & Report
Gurus, I am running a 'Sales -forecast & Commitment Analysis' report. For some reason, when I drill down to the Profit center, Major category & material level, my individual line items do not sum to the Result row i.e. there is a mismatch betwen th
-
I am trying to build an executible program that will be portable to machines which do not have CVI installed. It works fine on my CVI v9.1 system. However, whether or not I include "Full run-time support" in the build options, I get the error "The
-
Where can i get the documentation for 9i DB Data Dictionary (all)
Friends, I try to find the Oracle 9i Data Dictionary Documentation in the oracle document list. But i didnt find it. can anybody point me to the particular page or pdf? I need all the Data Dictionary details with explanation. is it available somewher
-
How to declare a variable in form
how to declare a variable in form?
-
Is there a way to accept audio imput for my program
I was interested in implementing some voice activated commands into my program and I was wondering if there's a command to. Any help?