Coherence not update database
Hi
I'm new in Coherence and I have a doubt about the synchronization between Coherence+JPA and the database.
I have created a data model with JPA Entities which has an entity Role with their privileges Map. Privileges Map is <String><PrivilegeList> and PrivilegeList has his own restrictions List, and so on.
I put into the cache only the role object and the data is generated and stored correctly in the database. But when I get the role from the cache, update a value of their objects and put it into the cache, the database remains equal, not update, but the cache has the changes.
What can be the problem? I can't update complex objects? I can only update simple objects?
Thanks in advance.
Hi
Any suggestion?
Maybe I have to create a different cache for each entity object of my model? Or indicate that my cache contains more than one entity on it?
I use Coherence 3.6 and JDeveloper 11.1.2.1
Thanks in advance.
Similar Messages
-
ERROR 2009-05-24 08:46:36 CJS-00288 Could not update database statistics.
Hi all.
i am in the middle of SAP ECC 5.0 installation .In the Database instance installation at the step 29 database update statistics, system stops giving error
ERROR 2009-05-24 08:46:44
CJS-00288 Could not update database statistics.<br>
DIAGNOSIS: Command brconnect -u / -c -f crsyn -o SAPDB5 returned 3.<br>SOLUTION: See brconnect.log for details.
when i checked in brconnect.log i found below error message
BR0801I BRCONNECT 7.00 (16)
BR0999E Loading of SQL client library oci.dll failed - please check Oracle configuration
BR0310E Connect to database instance DB5 failed
BR0280I BRCONNECT time stamp: 2009-05-24 08.46.44
BR0804I BRCONNECT terminated with errors
Q))Which oracle version are you using since BRTOOLS 7.0 is designed to work with Oracle 10g?
If you are using an oracle 9.2.* it is needed to install oracle instant client or to downgrade your db tools (brt* tools)...... Through :Forums I came to know that we have to downgrade the br*tools to
Could you please help me how to downgrade the Brtools or could you please suggest me how to proceed
please help me
Thanks
SenthilHi All,
Thanks for your help, that error it has passed but now in 31 st step starting RFC jobs
i get this error
ERROR 2009-05-25 18:08:05
FRF-00007 Unable to open RFC connection.
ERROR 2009-05-25 18:08:05
FRF-00063 RFC logon failed with message: Failed: SAP_CMINIT3 : rc=20 > Connect to SAP gateway failedConnect_PM GWHOST=CTSINSAPEC5, GWSERV=sapgw00, ASHOST=CTSINSAPEC5, SYSNR=00
but early during the last error update database statistics the SAP MMC console was up and running but now SAP is down during this error
i tried to start SAP manually but it never works dispatcher goes down, i searched in forums and thought to update the kernal, so i updated the kernal also and tried it then also same error
please help me my situation is very pathatic, i will be greatful if you help me
Thanks
Senthil -
ERROR 2008-04-30 09:10:35 CJS-00288 Could not update database statistics.
Hi Gurus..
Hi i am in the middle of NW 2004 installation . At the step 29 database update statistics, system stops giving error
ERROR 2008-04-30 09:10:35
CJS-00288 Could not update database statistics.
DIAGNOSIS: Command brconnect -u / -c -f crsyn -o SAPP47 returned
3.SOLUTION: See brconnect.log for details.
When i checked in brconnect.log i found below error message
BR0801I BRCONNECT 7.00 (16)
BR0999E Loading of SQL client library oci.dll failed - please check Oracle configuration
BR0310E Connect to database instance P47 failed
BR0280I BRCONNECT time stamp: 2008-04-30 09.10.35
BR0804I BRCONNECT terminated with errors
Q))Which oracle version are you using since BRTOOLS 7.0 is desinged to work with Oracle 10g?
If you are using an oracle 9.2.* it is needed to install oracle instantclient or to downgrade your db tools (brt* tools)...... Through :Forums I came to know that we have to downgrade the br*tools to
Could you please help me how to downgrade the Brtools.
It's urgent.
Points will be awarded .
Regards
Jan.Hi janakiram
Now i am facing the same error which you have faced before, have you solved that issue if it so could you pls help me how to solve this
Hi All,
i am in the middle of SAP ECC 5.0 installation .In the Database instance installation at the step 29 database update statistics, system stops giving error
ERROR 2009-05-24 08:46:44
CJS-00288 Could not update database statistics.
DIAGNOSIS: Command brconnect -u / -c -f crsyn -o SAPDB5 returned 3.
SOLUTION: See brconnect.log for details.
when i checked in brconnect.log i found below error message
BR0801I BRCONNECT 7.00 (16)
BR0999E Loading of SQL client library oci.dll failed - please check Oracle configuration
BR0310E Connect to database instance DB5 failed
BR0280I BRCONNECT time stamp: 2009-05-24 08.46.44
BR0804I BRCONNECT terminated with errors
Q))Which oracle version are you using since BRTOOLS 7.0 is designed to work with Oracle 10g?
If you are using an oracle 9.2.* it is needed to install oracle instant client or to downgrade your db tools (brt* tools)...... Through :Forums I came to know that we have to downgrade the br*tools to
Could you please help me how to downgrade the Brtools or could you please suggest me how to proceed
please help me
Thanks
Senthil -
Web form not updating database with stored procedure
Hello
i have a problem with the web form updating the database i have a stored procedure which i need to connect to. If i execute the procedure in the SQL it will update the database but when i run the web form i get my catch error "could not update database".
I have read so much on the net and my code seem ok but i,m just so lost.
stored procedure
PROCEDURE [dbo].[UpdateCustomer]
@ID INT,
@Firstname VARCHAR(30),
@Surname VARCHAR(30),
@Age INT
AS
BEGIN
UPDATE Customer
SET Firstname = @Firstname,
Surname = @Surname,
Age = @Age
WHERE CustID = @ID
END
update code
try
SqlCommand command = new SqlCommand();
command.Connection = conn;
command.CommandType = CommandType.StoredProcedure;
command.CommandText = "UpdateCustomer";
command.Connection.Open();
SqlParameter param = new SqlParameter();
param.ParameterName = "@ID";
param.SqlDbType = SqlDbType.Int;
param.Direction = ParameterDirection.Input;
param.Value = txtCustID.Text;
command.Parameters.Add(param);
command.Parameters.AddWithValue("@CustID", txtCustID.Text.ToString());
command.Parameters.AddWithValue("@Firstname", txtFirstname.Text);
command.Parameters.AddWithValue("@Surname", txtSurname.Text);
command.Parameters.AddWithValue("@Gender", Gender.Text.ToString());
command.Parameters.AddWithValue("@Age" ,txtAge.Text.ToString());
command.Parameters.AddWithValue("@Address1", txtAddress1.Text.ToString());
command.Parameters.AddWithValue("@Address2", txtAddress2.Text.ToString());
command.Parameters.AddWithValue("@City", txtCity.Text.ToString());
command.Parameters.AddWithValue("@Phone", txtPhone.Text.ToString());
command.Parameters.AddWithValue("@Mobile", txtMobile.Text.ToString());
command.Parameters.AddWithValue("@Email", txtEmail.Text.ToString());
command.ExecuteNonQuery();
lblMessage.Text = "Your Record(s) Have been Updated";
command.Connection.Close();
catch
lblMessage.Text = "Your Record was not updated please try again";
Thank you for your helpTo expand on Mike's advice.
Change your catch to:
catch(Exception ex)
{ // Break point here
lblMessage.Text = "Your Record was not updated please try again";
Put a break point in where the comment says.
Run it.
Hover over ex or add a quickwatch ( right click it ) and see what the error and inner exception is.
I see several problems though.
You have way too many parameters and Age should be int.
They are objects - they have a type.
It'll be a string with your code there.
Something more like
command.Parameters.Add("@Age", SqlDbType.Int);
command.Parameters["@Age"].Value = Convert.ToInt32(txtAge.Text);
Although that might not cut and paste, it's air code intended to give you the idea.
Hope that helps.
Technet articles: Uneventful MVVM;
All my Technet Articles -
Could not update database error while installation
Hi i am in the middle of 4.7 installation (IDES). At the step 29 database update statistics, system stops giving error
ERROR 2008-04-30 09:10:35
CJS-00288 Could not update database statistics.
<br>DIAGNOSIS: Command brconnect -u / -c -f crsyn -o SAPP47 returned
3.<br>SOLUTION: See brconnect.log for details.
Can anybody tell what could be the problem.
Thanks in advanceHi
Thanks for your reply. Following are the details of file brconnect.log:
BR0801I BRCONNECT 7.00 (16)
BR0999E Loading of SQL client library oci.dll failed - please check Oracle configuration
BR0310E Connect to database instance P47 failed
BR0280I BRCONNECT time stamp: 2008-04-30 09.10.35
BR0804I BRCONNECT terminated with errors -
BAPI_GOODSMVT_CREATE for production order,not update database
hi guru,
i am using BAPI_GOODSMVT_CREATE for production order.When i m testing this BAPI
at se37 it creates one mat doc no and i m not getting any return messages.Now i m
writing code for it at se38. but it does not update the database even though i used
bapi_transaction_commit. here sy-subrc = 0.bt when i m checking MSEG table showing
that mat doc no does not exists.
please help me out asap.
thanks and regurds,
manasiCHECK THIS CODE
REPORT ZBAPI_GOODSMVT_CREATE.
*DECLARING INTERNAL TABLE TO HOLD FILE DATA.
DATA: BEGIN OF itab OCCURS 0,
text(200),
END OF itab.
*DECLARING INTERNAL TABLE TO PASS FILE DATA.
TYPES: BEGIN OF tw_goodsmvt,
pstng_date TYPE budat,
doc_date TYPE bldat,
material TYPE matnr,
plant TYPE werks_d,
stge_loc TYPE lgort_d,
move_type TYPE bwart,
* entry_qnt TYPE erfmg,
costcenter TYPE kostl,
END OF tw_goodsmvt,
tt_goodsmvt TYPE STANDARD TABLE OF tw_goodsmvt.
DATA: lt_goodsmvt TYPE tt_goodsmvt,
lw_goodsmvt TYPE tw_goodsmvt.
*declaring internal table of bapi structure.
DATA:s_goodsmvt_header LIKE bapi2017_gm_head_01,
lt_goodsmvt_item TYPE STANDARD TABLE OF bapi2017_gm_item_create WITH HEADER LINE,
lt_return TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
DATA:str_filename TYPE string,
gm_code TYPE gm_code,
v_head_count TYPE i VALUE 0,
v_prev_count TYPE i VALUE 1,
v_qnt TYPE string,
v_dummy.
*selection screen
SELECTION-SCREEN BEGIN OF BLOCK bk with frame title text_001.
PARAMETERS:p_docdat TYPE bldat,
p_pstdat TYPE budat,
fname LIKE rlgrap-filename.
SELECTION-SCREEN END OF BLOCK bk.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR fname.
*to provide F4 functionality.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
IMPORTING
file_name = fname.
* start of selection
START-OF-SELECTION.
str_filename = fname.
gm_code = '06'.
* to upload data
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = str_filename
filetype = 'ASC'
has_field_separator = 'X'
read_by_line = 'X'
TABLES
data_tab = itab.
*SPLITING DATA TO INTERNAL TABLES.
LOOP AT itab.
IF itab+0(1) EQ 'H'.
v_head_count = v_head_count + 1.
IF v_head_count GT v_prev_count.
PERFORM bapi_upload.
ENDIF.
SPLIT itab-text AT ',' INTO v_dummy
lw_goodsmvt-pstng_date
lw_goodsmvt-doc_date.
s_goodsmvt_header-doc_date = lw_goodsmvt-doc_date.
s_goodsmvt_header-pstng_date = lw_goodsmvt-pstng_date.
v_prev_count = v_head_count.
ELSEIF itab+0(1) EQ 'L'.
SPLIT itab-text AT ',' INTO v_dummy
lw_goodsmvt-material
lw_goodsmvt-plant
lw_goodsmvt-stge_loc
lw_goodsmvt-move_type
v_qnt
lw_goodsmvt-costcenter.
* PASSING DATA TO INTERNAL TABLE TYPE BAPI STRUCTURE.
lt_goodsmvt_item-material = lw_goodsmvt-material.
lt_goodsmvt_item-plant = lw_goodsmvt-plant.
lt_goodsmvt_item-stge_loc = lw_goodsmvt-stge_loc.
lt_goodsmvt_item-move_type = lw_goodsmvt-move_type.
lt_goodsmvt_item-entry_qnt = v_qnt.
lt_goodsmvt_item-costcenter = lw_goodsmvt-costcenter.
APPEND lt_goodsmvt_item.
ENDIF.
v_prev_count = v_head_count.
ENDLOOP.
PERFORM bapi_upload.
*& Form bapi_upload
form bapi_upload .
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = s_goodsmvt_header
goodsmvt_code = gm_code
* TESTRUN = ' '
* IMPORTING
* GOODSMVT_HEADRET =
* MATERIALDOCUMENT =
* MATDOCUMENTYEAR =
tables
goodsmvt_item = lt_goodsmvt_item
* GOODSMVT_SERIALNUMBER =
return = lt_return.
PERFORM commit_work TABLES lt_return.
CLEAR : lw_goodsmvt, s_goodsmvt_header.
REFRESH: lt_goodsmvt[], lt_goodsmvt_item[].
endform. " bapi_upload
*& Form commit_work
* text
* -->P_LT_RETURN text
form commit_work tables p_lt_return structure bapiret2.
IF NOT lt_return[] IS INITIAL.
*error handling
loop at lt_return.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = lt_return-id
LANG = sy-langu
NO = lt_return-NUMBER
V1 = lt_return-message_v1
V2 = lt_return-message_v2
V3 = lt_return-message_v3
V4 = lt_return-message_v4
IMPORTING
MSG = lt_return-MESSAGE
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
WRITE: lt_return-id, lt_return-message, lt_return-message_v1, lt_return-message_v2,
lt_return-message_v3, lt_return-message_v4.
CLEAR lt_return.
ENDLOOP.
ELSE.
* commit work
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
* WAIT =
IMPORTING
RETURN = lt_return.
WRITE: lt_return-id, lt_return-message, lt_return-message_v1, lt_return-message_v2,
lt_return-message_v3, lt_return-message_v4.
CLEAR lt_return.
endif.
endform. " commit_work -
Not updating database table after editing using theADFapplicationJdev10.1.3
Hi
I created the Sample Browse and Edit JSF JSP page oracle ADF application as explained in the cuecards in Jdev10.1.3.
After editing the department table rows in browser i am checking the database tables for the changes.
But my table are still with the old data.they are not updating with the values i changed in the browser.
i followed the steps correctly as explained in cuecards.
where i am going wrong.
What i have to do to commit the changes in to database in my ADFApplication.Did i need anything to add my code.In Jdev 10.1.3,there is no operations folder directly under the Application data module control.
there is only constructors,merge entity,persist entity,refresh entity,remove entity and findalldepartments(),findallemployeeas() nodes under the application data module control.
In findalldepartments,findallemplloyees the operations node is there.under that i don't have the commit .i have only create,execute,first,previous,last,next,delete,removerowwithkey,setcurrentRowWithkey,setcurrentRowWithkeyValue under the operation node.
so how can i commit the operations in database.
Please help me. -
Hello,
I copy and pasted some code from WACK coldfusion book and i
can insert and delete lines on the screen, but when i refresh the
screen the changes didnt apply.
Any suggestions?
Am i supposed to add an update button also?
<!---
Name: grid2.cfm
Author: Ben Forta ([email protected])
Description: Flash editable data grid example
Created: 12/22/04
--->
<cfquery datasource="vdinfo" name="tableinfo">
Select * from uos
order by cwpartnbr
</cfquery>
<!--- Display data grid --->
<cfform format="flash" action="formdump.cfm">
<!--- Data grid --->
<cfgrid name="uos2"
selectmode="edit"
query="tableinfo"
insert="yes"
delete="yes"
height="400" />
</cfform>I have a similar problem where the update only effects some
of the records in the database - there are 4 records in the
database and I am able to only modify the 2nd and 3rd record -
changes made to the other records are ignored. The code follows:
<cfif isDefined("Form.Update")><!--Have we been
asked to update the database? -->
<cfgridupdate datasource="GISdb"
tablename="DistrictContacts" grid="g_Contacts">
Update was done.
</cfif>
<cfquery name="GetData" datasource="GISdb">
SELECT *
FROM DistrictContacts
</cfquery>
<cfform name="grid_test" action="Contacts_admin.cfm"
style="text-align:center" method="post">
<cfgrid name="g_Contacts" query="GetData"
colheaderbold="yes" selectmode="edit" width="100%" picturebar="yes"
delete="yes" sort="yes" insert="yes" maxrows="30"
selectcolor="##FF0000">
</cfgrid>
<cfinput type="submit" name="Update" value="Update the
database" tabindex="1">
</cfform>
There does not appear to be anything unique about the records
that would exlplain this. The result applies to any of the fields.
Any ideas? -
BAPI_SALESORDER_CHANGE not updating database
Hi,
I am using BAPI_SALESORDER_CHANGE to change the target quantity ( ZMENG ) of the Standard sales order.
I am getting no error message in the bapi return table but the data is not getting updated in the database.
I am also calling commit work 'BAPI_transaction_Commit'. Please let me know if there is an alternative to this BAPI. I have tried BAPI_SALESDOCUMENT_CHANGE also.
thanks,
HitanshuHitanshu,
You need to use as well the schedule line table and change the qty overthere. Did you use the schedule_linesx and order_item_inx to tell which fields you want to update?
Example code:
orderch_header_inx-updateflag = 'U'.
orderch_item_in-itm_number = it_vbap_old-posnr.
orderch_item_inx-itm_number = it_vbap_old-posnr.
orderch_item_inx-updateflag = 'U'.
APPEND : orderch_item_in, orderch_item_inx.
orderch_header_inx-updateflag = 'U'.
schedulech_lines-itm_number = it_vbap_old-posnr.
schedulech_lines-sched_line = '0001'.
schedulech_linesx-itm_number = it_vbap_old-posnr.
schedulech_lines-req_qty = it_vbap-kwmeng.
schedulech_linesx-sched_line = '0001'.
schedulech_linesx-req_qty = 'X'.
schedulech_linesx-updateflag = 'U'.
APPEND : schedulech_lines, schedulech_linesx.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = order_number
order_header_in = orderch_header_in
order_header_inx = orderch_header_inx
SIMULATION =
BEHAVE_WHEN_ERROR = ' '
INT_NUMBER_ASSIGNMENT = ' '
LOGIC_SWITCH =
TABLES
return = return
order_item_in = orderch_item_in
order_item_inx = orderch_item_inx
PARTNERS =
partnerchanges = partnerch
PARTNERADDRESSES =
ORDER_CFGS_REF =
ORDER_CFGS_INST =
ORDER_CFGS_PART_OF =
ORDER_CFGS_VALUE =
ORDER_CFGS_BLOB =
ORDER_CFGS_VK =
ORDER_CFGS_REFINST =
schedule_lines = schedulech_lines
schedule_linesx = schedulech_linesx
ORDER_TEXT =
ORDER_KEYS =
CONDITIONS_IN =
CONDITIONS_INX =
EXTENSIONIN = -
Submit does not update database data
Hello:
Thanks for looking at this post...
I'm trying to get a simple ADF Web app to update data in the database, but the submit button does not seem to be updating the database.
Below is how I created this issue. Any ideas on what I'm doing wrong?
Thanks for the help.
Don
--SCHEMA: JMM
CREATE TABLE EMPLOYEES (
EMPLOYEE_ID NUMBER NOT NULL,
EMP_STATUS VARCHAR2(10) NOT NULL,
EMP_TYPE VARCHAR2(10) NOT NULL,
FIRST_NAME VARCHAR2(20) NOT NULL,
LAST_NAME VARCHAR2(20) NOT NULL,
USER_ID VARCHAR2(30) NOT NULL,
PASSWORD VARCHAR2(30) NOT NULL,
EMAIL VARCHAR2(60),
PHONE VARCHAR2(30));
ALTER TABLE EMPLOYEES ADD CONSTRAINT EMPLOYEES_PK PRIMARY KEY (EMPLOYEE_ID);
STEPS TO REPRODUCE THE PROBLEM:
1. NEW FUSION WEB APPLICATION (ADF) WIZARD
2. CREATES APPLICATION15 AND ACCEPT DEFAULTS
3. IN MODEL PROJECT, RUN BUSINESS COMPONETNS FROM TABLES
4. CREATE CONNECTION TO JMM SCHEMA CALLED: AR_PLUTO_CONN_JMM -- SUCCESS
5. SELECTED EMPLOYEES TO CREATE ENTITY OBJECTS
6. SELECTED EMPLOYEESVIEW TO CREATE UPDATABLE VIEW OBJECT THEN FINISH --WORKS OK
7. OPEN adfc-config and add view to diagram called employees
8. DOUBLE-CLICK VIEW employees to create JSF PAGE ?CURRENTLY SET TO: DO NOT AUTOMATICALLY EXPOSE UI COMPONENTS IN MANAGED BEAN
9 ADD PANEL FORM LAYOUT TO JSF PAGE
10. IN DATA CONTROLLS, CLICK-MOVE EMPLOYEESVIEW1 TO EMPLOYEEVIEW PAGE UNDER PANEL FORM LAYOUT SELECTING FORMS---ADF FORM
11. IN EDIT FORM FIELDS, KEEP ALL FIELDS AND CHECK INCLUDE NAVIGATION CONTROLS AND INCLUDE SUBMIT BUTTON
12. TEST EMPLOYEEVIEW1 WITH ORACLE BUSINESS COMPONENTS BROWSER -- WORKS OK ADDED 2 EMPLOYEE RECORDS SUCCESSFULLY
13. SAVE ALL
14. RIGHT-CLICK EMPLOYEES.JSPX AND SELECT RUN
15. BROWSER COMES UP WITH DATA AND NAVIGATION WORKS OK
16. HOWEVER WHEN I CHANGE A VALUE OF A FIELD AND CLICK ON SUBMIT THE UPDATE DOES NOT OCCUR IN THE DATABASE.
17. NO ERRORS ARE REPORTED, JUST THE UPDATE DOES NOT OCCUR.Actually I have your book already! Thanks so much for taking the time to write it. I'm a long time Oracle DBA, but I had a hard time with JDeveloper before your book came along. I'm working through it as we speak. Congrats to all at Oracle...for all the hard work on Fusion and ADF. What incredible power in these products and your book started me off and gave me a giant head-start. Great Book!!! Thanks again, Don
-
Data is not updated in the database
hi.. to all..
i'm using the following code ...... but the data is not updated in the database.. the output window get closed as soon as i clicked save button...
i don't know wat's problem with the program...
Plz help me.. to get resolve this problem..
import java.applet.*;
import java.awt.*;
import java.sql.*;
import java.awt.event.*;
import sun.jdbc.odbc.*;
public class Customerdetails extends Frame implements ActionListener
TextField ccod,cname,add,phno,conp,email,fax;
Label l1,l2,l3,l4,l5,l6,l7;
Button save,exit;
Connection con;
ResultSet rs;
Statement stmt;
String s1,s2,s3,s4,s5,s6,s7;
public Customerdetails()
super("CustomerDetails");
setSize(700,750);
setLayout(null);
setBackground(new java.awt.Color(245, 117, 105));
l1=new Label("Customercode");
l2=new Label("CompanyName");
l3=new Label("Address");
l4=new Label("PhoneNumber");
l5=new Label("Contact person");
l6=new Label("EmailAddress");
l7=new Label("FaxNumber");
l1.setBounds(20,100,100,70);
l2.setBounds(20,180,100,70);
l3.setBounds(20,270,100,70);
l4.setBounds(20,340,100,70);
l5.setBounds(20,420,100,70);
l6.setBounds(20,500,100,70);
l7.setBounds(20,580,100,70);
ccod=new TextField();
cname=new TextField();
add=new TextField();
phno=new TextField();
conp=new TextField();
email=new TextField();
fax=new TextField();
ccod.setBounds(200,120,150,50);
cname.setBounds(200,200,150,50);
add.setBounds(200,280,150,50);
phno.setBounds(200,360,150,50);
conp.setBounds(200,440,150,50);
email.setBounds(200,520,150,50);
fax.setBounds(200,600,150,50);
Button save= new Button("Save");
Button exit= new Button("Exit");
save.setBounds(200,680,100,40);
exit.setBounds(350,680,100,40);
add(l1);
add(ccod);
add(l2);
add(cname);
add(l3);
add(add);
add(l4);
add(phno);
add(l5);
add(conp);
add(l6);
add(email);
add(l7);
add(fax);
add(save);
add(exit);
save.addActionListener(this);
exit.addActionListener(this);
setVisible(true);
addWindowListener(new WindowAdapter(){
public void WindowClosing(WindowEvent w) {System.exit(0);}});
public void actionPerformed(ActionEvent ae)
Customerdetails cud= new Customerdetails();
if(ae.getSource()==save)
s1=ccod.getText();
s2=cname.getText();
s3=add.getText();
s4=phno.getText();
s5=conp.getText();
s6=email.getText();
s7=fax.getText();
try
String query = "insert into Customerdetails (Customercode,CompanyName,Address,PhoneNumber,Contact person,EmailAddress,FaxNumber)"+ "values('"+s1+"','"+s2+"','"+s3+"','"+s4+"','"+s5+"','"+s6+"','"+s7+"')";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:prism");
stmt=con.createStatement();
rs=stmt.executeQuery(query);
stmt.close();
catch(ClassNotFoundException e)
System.out.println(e);
catch(SQLException e)
System.out.println(e);
else if(ae.getSource()==exit)
System.exit(0);
else
System.exit(0);
public static void main(String args[])
Customerdetails cud= new Customerdetails();
}This doesn't look right:
,FaxNumber)"+ "values(because it's equal to ,FaxNumber)values(and your SQL server won't understand it, put a whitespace between.
/M -
Friends i have table and i have created a sequence on basis of that table.
For 1st page i have created an html region and made few items there and a save button.
I am filling data to the fields in page 1 and clicking the save button. In save button i have passed the address of the items of 1st page to items of 2nd page which contains the same field of page 1 and few more additional field.
the 2nd page which i have made is on basis of form on a table or view and taken exsisting sequence there. When i clicking the submit button in page 2 it is not updating my database and throwing error called unable to fetch row. Any suggestions on this?Lev addition to this i wanted when my create button in 2nd page get clicks my database gets updated and also a query runs which checks the same data of combination variant_type,model_code,year_manuafacture. It means if i have 2 records in database with same variant_type,model_code,year_manufacture then in the field how_many in page 2 count of 3 gets updated and the other field solution avaiable get updated with Y.
For this in my local system in page 2 i created a plsql process and wrote this code and applied it with create button but its not working. Any idea where i am failing?
Declare
l_how_many Number;
l_sol_av Varchar2(1):= NULL;
Begin
select count(*)
into l_how_many
from quality
where 1=1
and variant_type= :P2_VARIANT_TYPE --'Road Bike'
and model_code = :P2_MODEL_CODE --'6'
and year_manufacture= :P2_YEAR_MANUFACTURE ; --'2000'
If l_how_many=null then
l_sol_av := 'N' ;
else
l_sol_av := 'Y';
end If ;
:P2_SOLUTION_AVAILABLE := l_sol_av;
:P2_HOW_MANY_RAISED := l_how_many;
Exception
when no_data_found then
null;
end; -
I use function in SQL statement. It is a dynamicaly build SQL, therefore I need overload functions. These funcs defined in package. The package has PRAGMA Restrict_References (.., WNDS). So all functions should be restricted to update database.
But Oracle returns an error:
Function NVL_ does not guarantee not to update database
This is my build SQL:
----- the execution string is: ---------------
Begin
INSERT INTO TEST_TBL_BS (MILL_ORDER, CLM1, CLM2, CLM3, NOTES, INIT_DATE )
VALUES (NV.NVL_(Arc_Utl.TEST_TBL_dltd.MILL_ORDER),
NV.NVL_(Arc_Utl.TEST_TBL_dltd.CLM1),
NV.NVL_(Arc_Utl.TEST_TBL_dltd.CLM2),
NV.NVL_(Arc_Utl.TEST_TBL_dltd.CLM3),
NV.NVL_(Arc_Utl.TEST_TBL_dltd.NOTES),
Arch.Init_Time );
End;
This is NV package:
PACKAGE NV IS
PRAGMA Restrict_References ( NV, WNDS );
NULL_date DATE := TO_DATE ('01/01/1001', 'mm/dd/yyyy');
NULL_numb NUMBER := 0;
NULL_str VARCHAR2 (10)
:= '?';
-- overloaded NULL_Val function returns NULL_<type> value (defined early)
-- depend on received variable type
FUNCTION NULL_Val ( val_in IN DATE )
RETURN DATE ;
FUNCTION NULL_Val ( val_in IN NUMBER )
RETURN NUMBER ;
FUNCTION NULL_Val ( val_in IN VARCHAR2 )
RETURN VARCHAR2 ;
-- PRAGMA Restrict_References ( NULL_Val, WNDS ); -- can be used in SQLs
-- these pretends to cover hole of the SYS.NVL that do not have posibility
-- to return default NULL value for every given type
FUNCTION NVL_ ( val_in IN DATE )
RETURN DATE ;
FUNCTION NVL_ ( val_in IN NUMBER )
RETURN NUMBER ;
FUNCTION NVL_ ( val_in IN VARCHAR2 )
RETURN VARCHAR2 ;
-- PRAGMA Restrict_References ( NVL_, WNDS ); -- can be used in SQLs
END NV;
CREATE OR REPLACE PACKAGE BODY NV AS
-- NULL_Val set of overloaded functions - returns appropriate NULL value
FUNCTION NULL_Val ( val_in IN DATE )
RETURN DATE IS
BEGIN RETURN NULL_date;
END NULL_Val; -- for date
FUNCTION NULL_Val ( val_in IN NUMBER )
RETURN NUMBER IS
BEGIN RETURN NULL_numb;
END NULL_Val; -- for NUMBER
FUNCTION NULL_Val ( val_in IN VARCHAR2 )
RETURN VARCHAR2 IS
BEGIN RETURN NULL_str;
END NULL_Val; -- for VARCHAR2
-- set NVL_ function to return default NULL value if received variable
-- is NULL or the received variable if it is not NULL
FUNCTION NVL_ ( val_in IN DATE )
RETURN DATE IS
BEGIN RETURN NVL( val_in, NULL_Val ( val_in )); END NVL_;
FUNCTION NVL_ ( val_in IN NUMBER )
RETURN NUMBER IS
BEGIN RETURN NVL( val_in, NULL_Val ( val_in )); END NVL_;
FUNCTION NVL_ ( val_in IN VARCHAR2 )
RETURN VARCHAR2 IS
BEGIN RETURN NVL( val_in, NULL_Val ( val_in )); END NVL_;
END NV;
Can anybody help : where is a problem and what I can do in my case?
I work in Oracle 7.3
Thank you,
AlexHi Alex,
I've found that on the RDBS docs:
If you specify DEFAULT instead of a function name, the pragma applies to all functions in the package spec or object type spec (including, in the latter case, the
system-defined constructor). You can still declare the pragma for individual functions. Such pragmas override the default pragma.
Try using that and let me know.
The docs says also that the declaration of the pragma for an overloaded function applies to the nearest one. You may also try to insert several declaration, one after every function declaration.
Bye Max -
ERROR IN FILE--XI--RFC SCENARIO. BAPI did not UPDATE the DATABASE TABLE
Hi
I have created a scenario FILE -XI- RFC
File is picked by file adapter - Its working fine
I have used BPM
In RFC side i used BAPI_INCOMINGINVOICE_CREATE
Its working fine and return an Invoice Number and Fisical year .
When i Check this in the R/3 System , in Invoice no Does not Exist .
Message mapping is ok
SXMB_MONI all are ok
Receiver file i got the invoice no and fisical year .
The Problem is " DATABASE TABLE DID NOT UPDATED "
So should i do BAPI_COMMIT seperately ........
Any solution ................
VERY VERY URGENT .....
thanks in advance
B.Judehi jude,
Commit Control for Single BAPI Calls
If you want to use this communication channel to call BAPIs as remote-enabled function modules that change data in the database, set the indicator.
If executed successfully, the transaction is written to the database by calling the function module BAPI_TRANSACTION_COMMIT explicitly. If an error occurs, the transaction is rolled back by BAPI_TRANSACTION_ROLLBACK.
The result is determined by the value of the field TYPE in parameter RETURN. If successful, the tables are empty and the values , S, I, and W are displayed. All other values are regarded as errors.
To change this setting, set the indicator BAPI Advanced Mode.
<b>In the Successful RETURN-TYPE Values table, enter the values that should lead to a successful execution.</b>
Regards,
Mandeep Virk -
File-to-rfc ..database tables are not updating??
hi xi friends..
in my file -to-rfc scenario.. without BPM ..
in sxmb_moni..it is showing successfull.. database tables in sap not updating..
my source structure..
workorders 1..1
..order 1..unbounded
...id
...operation 1..unbounded
.....id
.....closingdate
.....status
.....comment
my target is Zbapi_alm_conf_create..
Zbapi_alm_conf_create
...Zdetail_return 1..1
.....item 0..unbounded
...Ztimetickets
.....item 0..unbounded
.......orderid
.......operation
.......fin_conf
.......con_text
.......exec_fin_date
in message mapping:
MM_file_to_zrfc
i changed the occurance of target to unbounded..
message mapping like this..
my source structure..
workorders 1..1
..order 1..unbounded --------->Zrfc 0..unbouned
...id --------->Ztimetickets-item-order
...operation 1..unbounded ------>Ztimetickets-item 0..unbounded
.....id ---------->Ztimeticktes-item-operation
.....closingdate ----------->Ztimeticktes-item-exec_fin_date
.....status ----------->Ztimetickets-item-fin_conf
.....comment ------------>Ztimeticktes-item-conf_text
and also in interfacemapping ,changed the target occurance to unbounded.
and in ID ,interface determination using enhanced i selected interface mapping with occurance unbounded..
in sxmb_moni it is showing success..
in adapter monetering( receiver).
<i>Receiver channel 'cc_sap_work' for party '', service 'SAP_ERP__DEV' (internal name 'RfcClient[cc_sap_work]')
Client data: {jco.client.lang=EN, jco.client.snc_mode=0, jco.client.client=400, jco.client.passwd=****, jco.webas.ignore_jdsr_error=1, jco.client.user=aar, jco.client.sysnr=10, jco.client.ashost=53.247.192.84}
Repository data: {jco.client.lang=EN, jco.client.snc_mode=0, jco.client.client=400, jco.client.passwd=****, jco.webas.ignore_jdsr_error=1, jco.client.user=thotv, jco.client.sysnr=10, jco.client.ashost=53.247.192.84}
Current pool size: 0, maximum pool size : 1
Channel History
- OK: 2006-12-31 14:19:47 CET: Message processed for interface ZBAPI_ALM_CONF_CREATE
- OK: 2006-12-31 14:18:50 CET: Message processed for interface ZBAPI_ALM_CONF_CREATE</i>
but the database tables are not updating..if i execute ZBAPI_ALM_CONF_CREATE manually in SAP ..tables are updating...
please guide me...
thanks in advance...
regards
RamHi..
my mappis is like this..
message message
.message1 message1
..workorders 1..1
..order 1..unbounded -
>Zrfc 0..unbouned
...id -
>Ztimetickets-item-order
...operation 1..unbounded -
>Ztimetickets-item 0..unbounded
.....id -
>Ztimeticktes-item-operation
.....closingdate -
>Ztimeticktes-item-exec_fin_date
.....status -
>Ztimetickets-item-fin_conf
.....comment -
>Ztimeticktes-item-conf_text
i didnt mapped message at root..is this necessary to mapp messages??
please tell me
regards
ram
Maybe you are looking for
-
Copying Adjustments from One Work Station to Another
I have several computers, three of which are Macs and two of which I use for image processing. They are all networked but I can't figure out how to copy the work I do at one workstation to another workstation. Each has its own Aperture library and it
-
Maintaining operating concern after adding new value field
Hello, I added a new value field to our live operating concern,maintained the data structure throguh KEA0(Maintain operating concern).The changes are transported from Development to Quality,Changes were reflected in Q system.After testing in Q system
-
how do I get IE on my mac?
-
How to make a gradual opacity fade on a layer
Q: How do I make a layer gradually fade to reveal a layer beneath it? A: Use a Layer Mask; On your top layer, select Layer>Layer Mask (Reveal all or Hide all), then select the Gradient Tool, and make a black & white gradient on the layer mask. The la
-
I want to update my OS from X10.6.8 to the next level but I don't know what that is. Can someone tell me the next version to us? Thanks.