Updating a column in the database
Hi,
My requirement is to update a column in the database just before calling
OAException.raiseBundledOAException(getExceptionList());
I am calling the above in a method in the AM
Just before calling this I am Getting the handle of the VO (which is based on an EO, which in turn is based on the table which I want to update) and setting the value of that column as null. But the value is not getting updated at the database level.
When I query the database I can still see the earlier value and not the updated value.
In some cases I can see the value on the screen is updated but the value in the database remains same.
Please let me know how do I update a column in the database and
Thanks
Meenal
Hi,
I guess, since an excpetion is raised the transaction is not commited automatically by the framework.
Try commiting the transaction explicity after the update and before the exception. But i dont think, its a good design... anybody any idea ?!
Similar Messages
-
Update Column on The Database After Printing a Report Using BI Publisher
I need to update a flag on the database to say that a report has been printed. As the report is generated from the branch, I can't work out when and where to run my update process.
Any help would be appreciated.2 things..
1) Please update your forum handle to a more FRIENDLY name.. We are a friendly group here and do NOT bite (much..)
2) Please try searching the forum for past articles before posting a new thread. There have a been a posting sin regards to your issue in the past 3 months..: http://forums.oracle.com/forums/search.jspa?objID=f137&q=rich+text+bi+publisher
Seems to be an issue of the RTF file containing reserved characters used in the XML file used to submit to Bi Publisher from APEX..
Thank you,
Tony Miller
Webster, TX
Never Surrender Dreams!
JMS
If this question is answered, please mark the thread as closed and assign points where earned.. -
Update A Column In A Database Table.
I am unable to update a column in a database table.
For example; I have ten records in an EMP table without having any EMPNO. I want to UPDATE (insert) 10 different EMPNO in a table. How can I do it? All I know is that there are ten records in the table; this means that I cannot use a WHERE clause with different criteria for each row.
Thanks.Try something like this
SQL> select * from emp_1
2 /
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17-DEC-80 800 20
7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30
7566 JONES MANAGER 7839 02-APR-81 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-81 2850 30
7782 CLARK MANAGER 7839 09-JUN-81 2450 10
7788 SCOTT ANALYST 7566 19-APR-87 3000 20
7839 KING PRESIDENT 17-NOV-81 5000 10
7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-87 1100 20
7900 JAMES CLERK 7698 03-DEC-81 950 30
7902 FORD ANALYST 7566 03-DEC-81 3000 20
7934 MILLER CLERK 7782 23-JAN-82 1300 10
14 rows selected.
SQL> insert into emp_1(empno, ename, job, mgr, hiredate, sal, comm, deptno)
2 select null, ename, job, mgr, hiredate, sal, comm, deptno
3 from emp_1
4 where rownum <= 10
5 /
10 rows created.
SQL> select * from emp_1
2 /
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17-DEC-80 800 20
7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30
7566 JONES MANAGER 7839 02-APR-81 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-81 2850 30
7782 CLARK MANAGER 7839 09-JUN-81 2450 10
7788 SCOTT ANALYST 7566 19-APR-87 3000 20
7839 KING PRESIDENT 17-NOV-81 5000 10
7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-87 1100 20
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7900 JAMES CLERK 7698 03-DEC-81 950 30
7902 FORD ANALYST 7566 03-DEC-81 3000 20
7934 MILLER CLERK 7782 23-JAN-82 1300 10
SMITH CLERK 7902 17-DEC-80 800 20
ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
WARD SALESMAN 7698 22-FEB-81 1250 500 30
JONES MANAGER 7839 02-APR-81 2975 20
MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
BLAKE MANAGER 7839 01-MAY-81 2850 30
CLARK MANAGER 7839 09-JUN-81 2450 10
SCOTT ANALYST 7566 19-APR-87 3000 20
KING PRESIDENT 17-NOV-81 5000 10
TURNER SALESMAN 7698 08-SEP-81 1500 0 30
24 rows selected.
SQL> select max(empno) from emp_1
2 /
MAX(EMPNO)
7934
SQL> create sequence emp_seq start with 7935
2 /
Sequence created.
SQL> update emp_1 set empno = emp_seq.nextval where empno is null
2 /
10 rows updated.
SQL> select * from emp_1
2 /
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17-DEC-80 800 20
7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30
7566 JONES MANAGER 7839 02-APR-81 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-81 2850 30
7782 CLARK MANAGER 7839 09-JUN-81 2450 10
7788 SCOTT ANALYST 7566 19-APR-87 3000 20
7839 KING PRESIDENT 17-NOV-81 5000 10
7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-87 1100 20
7900 JAMES CLERK 7698 03-DEC-81 950 30
7902 FORD ANALYST 7566 03-DEC-81 3000 20
7934 MILLER CLERK 7782 23-JAN-82 1300 10
7935 SMITH CLERK 7902 17-DEC-80 800 20
7936 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
7937 WARD SALESMAN 7698 22-FEB-81 1250 500 30
7938 JONES MANAGER 7839 02-APR-81 2975 20
7939 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
7940 BLAKE MANAGER 7839 01-MAY-81 2850 30
7941 CLARK MANAGER 7839 09-JUN-81 2450 10
7942 SCOTT ANALYST 7566 19-APR-87 3000 20
7943 KING PRESIDENT 17-NOV-81 5000 10
7944 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
24 rows selected. -
ADF 11g Partial Triggers Row Column Update By Column in the Same Row
Hi.
I have a situation whereby I have a checkbox in a table row, which has an eventchangelistener, which upon activation, trys to update another column in the same row. I can not get this to work through partial triggers, even though I have set up my ids up correctly. The row though can be updated by a command button outside of the table using the same coding techniques, but I need it updated via the checkbox.
Is there a limitation in updating a column within a row, from another row column's event change listener.
Thanks.Updating the other rows from the checkbox works fine for me. Here is what I did.
I DnD Emp table with a new column that says if the emp is new hire. If the checkbox is checked, I set Firstname and Lastname for that row as NewHire. I have partial triggers on Firstname and Lastname columns to update whenever checkbox is checked/unchecked and autosubmit on checkbox to true. Hope this helps.
Try adding column selection property to single and see if it helps.
Edited by: asatyana on Jan 16, 2012 12:48 AM
Edited by: asatyana on Jan 16, 2012 12:49 AM -
Navigation to update a column in the table jtf.jtf_rs_resource_extns
Hi All,
I'm using oracle 11.5.10
Can somebody tell me the frontend form which is related to the table jtf.jtf_rs_resource_extns
I need to update a column in the above table from the frontend.
Please explain me the navigation for doing the same
Regards,
MohanI can't tell you the answer to your query but what I can tell you is that you have logged the thread in a wrong forum. As far as my knowledge goes, this table does not delong to HRMS.
Just check the product in which you are working and then log the thread in the right forum.
Thanks, -
Inserting multiple selection from checkbox in to one column of the database
Hi,
how to insert multiple selection from checkbox into one column of the database.(I select array of values from checkbox ,then how to insert tat array of values iinto single column name).
Anyone can u reply me
Thanxhhhmmm.... is this what you mean?
lets say you hava a checkbox1 with values value1, value2, value3 and you selected all there of them? then you want then to be stored in the database in one column?
now the question is:
Is it going to be one column one row?
datafield
value1,value2,value3
Or one column multiple row?
datafield
value1
value2
value3
Which is it? -
Inserting multiple selection from checkbox into one column of the database
Hi,
How to insert multiple selection values from checkbox into one column of the database.
Anyone can u help me
Thanxhi
try to use request.getParameterValues("fieldname") -
"Failed to update binary data in the database".
Hi,
we will get this message ("Failed to update binary data in the database".) when one of our customers want to install our add-on in one specific server.
they got a copy of their database and put in another computer and could install add-on. but they can not install add-on on their main server.
please advice me.Hi Senthil,
Thanks for your consideration,
They checked and they dont have any record in SARI table related to R1. they have one record for XLR only.
This problem is only on one specific server.
Do you have any other idea? Please help us.
Regards,
Neda -
Creating Infopath forms programmatically - unable to update promoted columns in the library
I referred to the following article and was able to create the forms successfully.
http://www.codeproject.com/Articles/33228/Programmatically-create-a-browser-enabled-InfoPath
But, I noticed that the generated Xml looks a bit different than if I'm creating the document through Sharepoint directly,
for example, a snippet of the generated Xml (through Sharepoint) looks like:
<my:Employee>
<my:LastName>Test</my:LastName>
<my:GivenName>Test</my:GivenName>
<my:EmployeeNumber>1</my:EmployeeNumber>
</my:Employee>
but it looks like the following when I create the document from my C# code:
<Employee>
<LastName>Test</LastName>
<GivenName>Test</GivenName>
<EmployeeNumber>1</EmployeeNumber>
</Employee>
The issue that I'm noticing is that if I chose to publish some of columns (when I publish the form to the sharepoint site) then
the columns will not show the values (I'm guessing that is due to the missing "my" before the fields).
Is there a way to work-around that? or am I doing something incorrect on my side?
Thank you,Here is a complete method for creating a new infopath form and updating some columns of the new form using sharepoint client object model:
public string AddNewForm(string WebUrl, string NewTitle)
string strMsg = "";
if (string.IsNullOrEmpty(WebUrl))
return "Empty URL!";
try
// Starting with ClientContext, the constructor requires a URL to the server running SharePoint.
using (ClientContext client = new ClientContext(WebUrl))
//client.Credentials = System.Net.CredentialCache.DefaultCredentials;
// Assume that the web site has a library named "FormLibrary".
var formLib = client.Web.Lists.GetByTitle("FormLibrary");
client.Load(formLib.RootFolder);
client.ExecuteQuery();
// FormTemplate path, The path should be on the local machine/server !
string fileName = @"D:\Projects\FormTemplate.xml";
var fileUrl = "";
//Craete FormTemplate and save in the library.
using (var fs = new FileStream(fileName, FileMode.Open))
var fi = new FileInfo("newForm.xml");
fileUrl = String.Format("{0}/{1}", formLib.RootFolder.ServerRelativeUrl, fi.Name);
Microsoft.SharePoint.Client.File.SaveBinaryDirect(client, fileUrl, fs, true);
client.ExecuteQuery();
// Now we are going to update new form fields.
// Get library columns collection.
var libFields = formLib.Fields;
client.Load(libFields);
client.ExecuteQuery();
Microsoft.SharePoint.Client.File newFile = client.Web.GetFileByServerRelativeUrl(fileUrl);
ListItem item = newFile.ListItemAllFields;
// Here the index of Title column is 9, you may use this form to update any column (even promoted fields).
// To find the index of interested column you should inspect libFields at debug mode, look in the libFields.Fields collection to find the index!
item[libFields[9].StaticName] = NewTitle ;
item.Update();
client.ExecuteQuery();
catch (Exception ex)
strMsg = ex.Message;
return strMsg; -
UPDATING A TABLE IN THE DATABASE
I was just wonderng if u had 2 Java applications 1 ,a replica of another.Each application updates the exact same table with information in a database.If both applications are run at the exact same time what would happen,would it have any effect on the database?or would it do any harm?
The chances of two applications running at exactly the same time are miniscule. If they each have a connection to the database, and are both trying to modify the same table, then chances are one will be slightly after the other its changes would be committed last. In the case where one might delete a row just before another tries to access that row, you're going to have some sort of problem. However, those circumstances are pretty rare, and even so, some small amount of exception handling can deal with them gracefully.
-
Updating a row in the DataBase
HI all
1>>I want to update the row which is edited in the form
2>>So i am setting all the values in a bean class
3>>I am opening the connection in the bussiness Logic class
4>>I am writing the query for the updation of the row using the Match_ID which was which was filled at the time of the insertion of the data
5>>When iam executing it (a)I am getting no errors nor on the browsing page nor on the Tomcat console
6>>So if any one who can say where I might be going wrong
in the bussiness Logic or BeanClass or Servlet Or jsp(form page) or Should i post my Code
Thanks1>>I am Sending the value through the hidden field form to the servlet
<form type="hidden" name="mid" value='<%=request.getAttribute("mid")%>'>-----------------------------------------------------------------------------------------------
2>>Then in the servlet
String idproof=req.getParameter("mid");
int idp=Integer.parseInt(idproof);//parsing the value
User3 use3=new User3();// creating the bean object use3
use3.setIdproof(idp); //setting all the values in the bean class
UserServices3 userServices3 = new UserServices3(); //also creating bussinesslogic class object
userServices3.editMatch(use3);
3>>Then in BussinessLogic Class
public void editMatch(User3 user){
User3 use3=user;
int idProof=use3.getIdproof();
........//creating connection to the DataBase
PeparedStatement ps=con.prepareStatement("UPDATE Match_Set set Match_ID=? , Team1=? , Team2=? , Odd1=? , Odd2=? , Start_date=? , End_Date=? WHERE Match_ID=? ");
ps.setInt(1,ss);
ps.setString(2,s2);
ps.setString(3,s3);
ps.setFloat(4,s4);
ps.setFloat(5,s5);
ps.setString(6,s6);
ps.setString(7,s7);
ps.setInt(8,idProof);
int i=ps.executeUpdate();Message was edited by:
saamer -
About existence of added column in the database apex application.
Hi,
I have created an report apex application based on the table. Consider the table as Employee_details
The columns in the Employee_details tables are
*) Employee_id
*) name
*) ip_address
*) host_name
*) port_no
*) sys_type
*) email_id
*) login_id
*) sys_config
*) sys_serial_no
*) place_allotted
*) internet_status
and also i have created an application using this column......Now i need to add an extra column "contact_no" with this table.....
That only also i added in the table by giving "Add column" the column is added in the table.....
But i need to add that extra column "contact_no" in my current application along with the existed columns.
I went to "Actions" in the application that i have created, and i shifted that "contact_no" column from "do not display side to the display side". Now it is displaying.
But the problem where i getting here is, when i logged out of the application and when i again login into the application the "contact_ no" column that i added to show it in display field is not displaying...Why?.........
Regards,
Hari RHi,
If its a table column then its better to add it to the IR by modifying the Report Query of the IR.
If you add it through the Action button then you need to save the report as Default Setting for it to keep appearing the next time you visit the page.
Regards -
Jsp form - inserting multiple selection in to one column of the database
I have this JSP/ HTML form that has fields that I can select multiple values and in the backend there is only one table. But when I select these multiple value and submit, only one value gets to the database. How do I get all the values that I selected .
By the way I am using jdeveloper 10g and oracle 9i database
thank you,
santhanks aleena. sorry for the late reply. Because I away during the weekend. so I saw u are also into a web application project. I use jdeveloper 10g as my developing tool. its free to download for personal use. It may help you with your class project.
also thanks to dev_AZ
angrycat here is a similar example of my problem
<select size="8" name="fruit" multiple>
<option value="apple">apple</option>
<option value="orange">orange</option>
<option value="mango">mango</option>
<option value="cherry">cherry</option>
<option value="pineapple">pineapple</option>
<option value="grapes">grapes</option>
</select>
if i select apple, orange,mango and cherry and submit it to the database field 'fruit', only 'apple' gets inserted. none others.
this is the line where it is processing the value.
String fruit=request.getParameter("fruit");
by the way I have only one database table
I am going to try the for loop example that aleena has posted.
one more time thanks everyone
santhosh -
Finding a column in the database tables
Hi,
I am new in databases and I just started on a project which was already half done.
Sometimes I find it difficult to find out where a column is, i.e. in which table is?
Is there a query to find it out?
For e.g, there are 100 tables. I want to find a column "Description". I want to know in which table the column "Description" is.
Any help would be appreciated.If you are connect to the schema where you want to search use, user_tab_columns with the following query:
SELECT table_name,column_name FROM user_tab_columns
WHERE column_name like '%STRING%'
ORDER BY 1;
If you want to find out in all the schemas (entire database), use dba_tab_columns.
Jaffar -
.SubmitChanges does not update foreign key to the database
My problem occurs in a Windows Phone 8.1 Silverlight VB application. The CatDataContext defines a table Books with items Title and a foreign key _seriesID, with belongs to a table Series.
Updating of the field Title alone, or the fields Title and _seriesID works fine. However when I only change the _seriesID then no update of the underlying database is done. In this case .GetModifiedMembers shows no modifications.
A demo project with this problem is available.Your demo project url is missing, check it.
Maybe you are looking for
-
Non-window​s tcp/ip
Hi, I have a PXI 8184RT with LabView Real time 8.0. Also a have an instrument called Insensys that sense fiber optics strain sensors and send me an array of double values by TCP/IP. I have developed a software that works properly when I run it in a w
-
Incorrect Cost center posting on vendor invoice.
Hi All, When a purchase order is created, the Account assignment tab on the Items has G/L Account 71005050 and cost center 100704. when a invoice is created, it is posting to the correct G/L account but to different cost center 100708. Please advice
-
Export PDF Files from CR Developer 14.0.2
I have 8.5 crystal and have a classic asp application that generates pdf files in a batch mode. Parameters are selected from an Access database. How do I accomplish generating pdf files with the new version that I have just installed. (trial versi
-
File could not be written - Secude
hi to all, sorry interupting you but i am new here and couldnt find the right place for my question. maybe you can help me. following error message is struggeling me quiet hard: psemanagment: file could not be written: U:\My documents\appdata\keys\%
-
No issues when saving to EPS but i always forget doing it. So saves in AI can't be retrieved. Help Adobe?