Error While Inserting Data into table using OAF
Hi Experts,
I am learning OAF; i am trying into insert the data into table using OAF. I followed the below procedure.
My table(OLF_TEST_TBL) Columns:
EmpID (Number), Ename(VARCHAR2 100), Sal Number, and who columns.
1. created Application Module (AM).
package: oracle.apps.mfg.simplepg.server
name: oaf_test_tbl_am
2. created simple page
name:EmployeePG
package:oracle.apps.mfg.simplepg.webui
3. Assigned the Application Module to Page
4. Created Entity Object(EO)
name:oaf_test_tbl_eo
package:oracle.apps.mfg.simplepg.schema.server
schema:apps
table:OLF_TEST_TBL
note:
1. EMPID column is selected as primary key
2. selected create method, remove method and validation method.
3.checked generate default view object
VO:
name:olf_test_tbl_vo
note: Entity Object was assigned to VO
Coming To page:
page main region:EmployeeMainRN
1.under main region i created one more region using wizard
selected AM and VO, region style-default single column
2. under main region i created one more region
region style- pagebuttonbar, ID:pagebutoonsRN
3. under pagebuttonRN, created two submit buttons(ID:SUBMIT, ID:CANCEL).
In AM java page:
created a method to insert row and for commit.
Insert Method:
public void insertrow(){
OAViewObject vo=(OAViewObject)getoaf_test_tbl_vo1();
if(!vo.isPreparedForExecution()){
vo.executeQuery();
Row row=vo.createRow();
vo.insertRow(row);
row.setNewRowState(Row.STATUS_INITIALIZED);
Commit Method:
public void savaDataTooaftesttable(){
getDBTransaction().commit();
In EmployeeMainRN, created a controller.
In this controller process request method, 'insertrow' method was called.
import oracle.apps.fnd.framework.OAApplicationModule;
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
if (!pageContext.isFormSubmission())
OAApplicationModule am = pageContext.getApplicationModule(webBean);
am.invokeMethod("insertrow");
To commit the transaction when SUBMIT button pressed, commit method was called in process form request method.
import oracle.apps.fnd.framework.OAViewObject;
public void processformRequest(OAPageContext pageContext, OAWebBean webBean)
super.processFormRequest(pageContext, webBean);
OAApplicationModule am = pageContext.getApplicationModule(webBean);
if (pageContext.getParameter("SUBMIT") != null)
am.invokemethod("savaDataTooaftesttable");
Error After clicking the submit button_
I ran the page, page was opened successfully. Once i enter data and click submit button, it's giving the following error.
The requested page contains stale data. This error could have been caused through the use of the browser's navigation buttons (the browser Back button, for example). If the browser's navigation buttons were not used, this error could have been caused by coding mistakes in application code. Please check Supporting the Browser Back Button developer guide - View Object Primary Key Comparison section to review the primary causes of this error and correct the coding mistakes.
Cause:
The view object oaf_test_tbl_am.oaf_test_tbl_vo1700_oaf_test_tbl_vo1_practice_test_prc1_oracle_apps_mfg_simplepg_server_oaf_test_tbl_am.oaf_test_tbl_vo1 contained no record. The displayed records may have been deleted, or the current record for the view object may not have been properly initialized.
To proceed, please select the Home link at the top of the application page to return to the main menu. Then, access this page again using the application's navigation controls (menu, links, and so on) instead of using the browser's navigation controls like Back and Forward.
Experts, Kindly help me why i am getting this error.
Awating your replies.
Thanks in advance.
If you dont want to create message. You can throw exception like below as well
throw new OAException("Emp Id is "+empId+" and employee name is "+empName, OAException.CONFIRMATION);Thanks
--Anil
Similar Messages
-
Error while inserting data into a table.
Hi All,
I created a table.While inserting data into the table i am getting an error.Its telling "Create data Processing Function Module".Can any one help me regarding this?
Thanx in advance
anirudhHi Anirudh,
Seems there is already an entry in the Table with the same Primary Key.
INSERT Statement will give short dump if you try to insert data with same key.
Why dont you use MODIFY statement to achieve the same.
Reward points if this Helps.
Manish -
Error while load data into Essbase using ODI
Hi ,
I'm getting the following error while loading measures into Essbase using ODI, I used the same LOG nd Error file and file path for all my Dimensions , this worked well but not sure why this is not working for measures....need help.
File "<string>", line 79, in ?
com.hyperion.odi.common.ODIHAppException: c:/temp/Log1.log (No such file or directory)
Thanks
VenuAre you definitely running it against an agent where that path exists.
Have you tried using a different location and filename, have you restarted the agent to make sure there is not a lock on the file.
Cheers
John
http://john-goodwin.blogspot.com/ -
Error while Inserting data into flow table
Hi All,
I am very new to ODI, I am facing lot of problem in my 1st interface. So I have many questions here, please forgive me if it has irritated to you.
========================
I am developing a simple Project to load a data from an input source file (csv) file into a staging table.
My plan is to achieve this in 3 interfaces:
1. Interface-1 : Load the data from an input source (csv) file into a staging table (say Stg_1)
2. Interface-2 : Read the data from the staging table (stg_1) apply the business rules to it and copy the processed records into another staging table (say stg_2)
3. Interface-3 : Copy the data from staging table (stg_2) into the target table (say Target) in the target database.
Question-1 : Is this approach correct?
========================
I don't have any key columns in the staging table (stg_1). When I tried to execute the Flow Control of this I got an error:
Flow Control not possible if no Key is declared in your Target Datastore
With one of the response (the response was - "FLOW control requires a KEY in the target table") in this Forum I have introduced a column called "Record_ID" and made it a Primary Key column into my staging table (stg_1) and my problem has been resolved.
Question-2 : Is a Key column compulsary in the target table? I am working in BO Data Integrator, there is no such compulsion ... I am little confused.
========================
Next, I have defined one Project level sequence. I have mapped the newly introduced key column Record_Id (Primary Key) with the Project level sequence. Now I am got another error of "CKM not selected".
For this, I have inserted "Insert Check (CKM)" knowledge module in my Project. With this the above problem of "CKM not selected" has been resolved.
Question-3 : When is this CKM knowledge module required?
========================
After this, the flow/interface is failing while loading data into the intermediar ODI created flow table (I$)
1 - Loading - SS_0 - Drop work table
2 - Loading - SS_0 - Create work table
3 - Loading - SS_0 - Load data
5 - Integration - FTE Actual data to Staging table - Drop flow table
6 - Integration - FTE Actual data to Staging table - Create flow table I$
7 - Integration - FTE Actual data to Staging table - Delete target table
8 - Integration - FTE Actual data to Staging table - Insert flow into I$ table
The Error is at Step-8 above. When opened the "Execution" tab for this step I found the message - "Missing parameter Project_1.FTE_Actual_Data_seq_NEXTVAL RECORD_ID".
Question-4 : What/why is this error? Did I made any mistake while creating a sequence?Everyone is new and starts somewhere. And the community is there to help you.
1.) What is the idea of moving data from stg_1 and then to stg_2 ? Do you really need it for any other purpose other than move data from SourceFile to Target DB.
Otherwise, its simple to move data from SourceFile -> Target Table
2.) Does your Target table have a Key ?
3.) CKM (Check KM) is required when you want to do constraint validation (Checking) on your data. You can define constraints (business rules) on the target table and Flow Control will check the data that is flowing from Source File to Target table using the CKM. All the records that donot satisfy the constraint will be added to E$ (Error table) and will not be added to the Target table.
4.) Try to avoid ODI sequences. They are slow and arent scalable. Try to use Database sequence wherever possible. And use the DB sequence is target mapping as
<%=odiRef.getObjectName( "L" , "MY_DB_Sequence_Row" , "D" )%>.nextval
where MY_DB_Sequence_Row is the oracle sequence in the target schema.
HTH -
Error while loading data oracle table using xslt
Hi
I have an following xml:
<TRAN TRAN_ID = "12" RCODE = "W"> <STATION>1234567</STATION> </TRAN>
I have created the following xslt for the above xml:
<?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="TRAN"><xsl:value-of select="@TRAN_ID" /> <xsl:value-of select="@RCODE" /> </xsl:template> </xsl:stylesheet>
I am trying to insert data into the table Tran having columns tran_id and rcode in oracle database 11g.
I am getting the following error:
ERROR at line 1:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00210: expected '<' instead of '1'
ORA-06512: at "SYS.DBMS_XMLSTORE", line 78
ORA-06512: at "SYS.DBMS_XMLSTORE", line 88
Can anybody tell me if i am making a mistake in writing the xlst?
Thanks in advance.Thank you for your reply. Currently i am using the insert using xmltable and it works fine. But i would like to use xsl if the dynamic passing of values is possible. Actually i want to store the xsl in a table and call it when needed to insert data to the database table (MSGS). Could you please give me an example of it?
Here is the table structure i have in database:
Table Name: Tran_data
columns: SEQ NUMBER NOT NULL ,
TRAN_ID VARCHAR2(6) NOT NULL ,
RCODE VARCHAR2(30) NOT NULL ,
TRAN_DT DATE NOT NULL ,
xml_data xmltype
Table Name : Msgs
SEQ NUMBER NOT NULL,
RULE_ID VARCHAR2(200) not null,
MSG_TXT VARCHAR2(2000) NOT NULL,
TRAN_DATA_SEQ NUMBER NOT NULL ,
CREATE_USER VARCHAR2(30) NOT NULL ,
CREATE_DATE DATE NOT NULL ,
COMMENTS VARCHAR2(2000)
In this TRAN_DATA_SEQ is a foreign key and is a mandatory column. I can get the Tran_id and the rcode from xml. but the remaining mandatory columns i need to pass them to the xsl. Below is the xsl. Can you please let me know how to pass value to this the xsl.
[P]
xml:
<RES>
<Status>'PASS'</Status>
<Tran_id>1A</Tran_id>
<Rcode>1BR</Rcode>
<Msg>
<Rule_Id>A<Rule_Id>
<Msg_Text>'CRDT Failed'<Msg_Text>
</Msg>
<Msg>
<Rule_Id>B<Rule_Id>
<Msg_Text>'MAN Failed'<Msg_Text>
</Msg>
</RES>
[P]
I need an xsl for this xml to insert tran_id and rcode in tran_data table along with the xml as xml_data and the msg information in msgs table. The seq of tran_data needs to be inserted into the msgs table. Please let me know how this can be achieved using xsl?
Thanks in advance. -
Error while inserting data into BFILE datatype
Dear Experts,
I am trying to insert data into resume table, but it is throwing error:
create table resume(resume blob);
declare
f_lob bfile;
b_lob blob;
begin
insert into resume(resume) values(empty_blob())
return documents into b_lob;
f_lob := bfilename( 'RESUME_SAVE', 'Pawan-resume.doc' );
dbms_lob.fileopen(f_lob, dbms_lob.file_readonly);
dbms_lob.loadfromfile
( b_lob, f_lob, dbms_lob.getlength(f_lob) );
dbms_lob.fileclose(f_lob);
commit;
end;
return documents into b_lob;
ERROR at line 8:
ORA-06550: line 8, column 10:
PL/SQL: ORA-00904: "DOCUMENTS": invalid identifier
ORA-06550: line 7, column 2:
PL/SQL: SQL Statement ignored
Please help
Regards
Sunil KumarThank you very much Mihael................... It works
But I think there is a mistake in oracle documentation, please check following link:
http://docs.oracle.com/cd/B10501_01/appdev.920/a96591/adl14cas.htm
Thanks & Regards
Sunil Kumar -
Error while loading Data into Essbase using ODI
Hi,
I am very new to ODI. I have installed ODI and working on Demo environment only. I havn't done any configuration. I am using Essbase Technology which is coming by default.
I have created one sample outline in Essbase and a text file to load data into essbase using ODI.
Following my text file.
Time Market Product Scenario Measures Data
Jan USA Pepsi Actual Sales 222
I am getting the error. I have checked in Operator. It is giving at step 6 i.e. Integration SampleLoad data into essbase.
Here is the description.
from com.hyperion.odi.common import ODIConstants
from com.hyperion.odi.connection import HypAppConnectionFactory
from java.lang import Class
from java.lang import Boolean
from java.sql import *
from java.util import HashMap
# Get the select statement on the staging area:
sql= """select C3_C1 ""Time"",C5_C2 ""Market"",C2_C3 ""product"",C6_C4 ""Scenario"",C1_C5 ""Measures"",C4_C6 ""Data"" from "C$_0Demo_Demo_genData" where (1=1) """
srcCx = odiRef.getJDBCConnection("SRC")
stmt = srcCx.createStatement()
srcFetchSize=30
stmt.setFetchSize(srcFetchSize)
rs = stmt.executeQuery(sql)
#load the data
stats = pWriter.loadData(rs)
#close the database result set, connection
rs.close()
stmt.close()
Please help me to proceed further...Hi John,
Here is the error message in execution tab....
org.apache.bsf.BSFException: exception from Jython:
Traceback (innermost last):
File "<string>", line 20, in ?
java.sql.SQLException: Unexpected token: TIME in statement [select C3_C1 ""Time]
at org.hsqldb.jdbc.jdbcUtil.sqlException(jdbcUtil.java:67)
at org.hsqldb.jdbc.jdbcStatement.fetchResult(jdbcStatement.java:1598)
at org.hsqldb.jdbc.jdbcStatement.executeQuery(jdbcStatement.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java)
at org.python.core.PyMethod.__call__(PyMethod.java)
at org.python.core.PyObject.__call__(PyObject.java)
at org.python.core.PyInstance.invoke(PyInstance.java)
at org.python.pycode._pyx4.f$0(<string>:20)
at org.python.pycode._pyx4.call_function(<string>)
at org.python.core.PyTableCode.call(PyTableCode.java)
at org.python.core.PyCode.call(PyCode.java)
at org.python.core.Py.runCode(Py.java)
at org.python.core.Py.exec(Py.java)
at org.python.util.PythonInterpreter.exec(PythonInterpreter.java)
at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:144)
at com.sunopsis.dwg.codeinterpretor.k.a(k.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
at com.sunopsis.dwg.cmd.e.i(e.java)
at com.sunopsis.dwg.cmd.g.y(g.java)
at com.sunopsis.dwg.cmd.e.run(e.java)
at java.lang.Thread.run(Unknown Source)
java.sql.SQLException: java.sql.SQLException: Unexpected token: TIME in statement [select C3_C1 ""Time]
at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
at com.sunopsis.dwg.codeinterpretor.k.a(k.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
at com.sunopsis.dwg.cmd.e.i(e.java)
at com.sunopsis.dwg.cmd.g.y(g.java)
at com.sunopsis.dwg.cmd.e.run(e.java)
at java.lang.Thread.run(Unknown Source) -
Error while loading data into 0pur_c03 using 2lis_02_scl
Hi,
While trying to load data into 0pur_c03 by using Data Source 2lis_02_scl from R/3 the error message "The material 100 does not exist or not active" is being displayed. I have loaded master data for 0Material and performed change Run also.Still the problem is not resolved.Please suggest in resolving this issue.
Regards,
Hari Prasad B.I have the same problem in my system and i found that the material XXXXX had movements.....sales documents and more but in certain moment it material was deleted in R3 and it is not loaded into 0MATERIAL infoobject because is marked for deletion....
If you have this error must activate the load request manually and your infocube can hold the data without any problem.....
Regards -
Error while inserting data in Forms10G using TEXT_IO
Dear all i am using 10g Forms.
I am using Text_io to read the text file and putting into table and again reading the tables and putting into another text file .
I was testing in 3 tables which is the same copy of the original table but only the name is different .
But after testing when i change the table name to Original table name , it is not inserting for 1 table .
What could be the reason ?
I already check the columns and all , everything is current .
Edited by: Sandy on Sep 14, 2010 5:39 PMPlease use tags when posting your code over here and format it proper so others can read it more easily.
e.g.
[code]
procedure my_proc is
num_data number;
begin
select 1
into num_data
from dual;
if num_data = 2 then
end;
[/code]
Are you sure you are getting here:
[code]
INSERT INTO MU_PAY_OLB(RECORD_TYPE,LOAD_NO,TRAN_AMT,OLB_CODE,ACCT_NO,BEN_NAME,PAY_DTL,MACCS_IND)
VALUES(lval,l_val,DTL_AMT,lbank,DTL_BEN_AC_NO,DTL_BEN_NM,Null,'N');
[/code]
Also: only trap the exceptions you expect, and not ALL exceptions e.g.
[code]
begin
INSERT INTO MU_PAY_OLB(RECORD_TYPE,LOAD_NO,TRAN_AMT,OLB_CODE,ACCT_NO,BEN_NAME,PAY_DTL,MACCS_IND)
VALUES(lval,l_val,DTL_AMT,lbank,DTL_BEN_AC_NO,DTL_BEN_NM,Null,'N');
exception
when dup_val_on_index then
--do whatever you need to do in that case
end;
[/code]
Maybe your tablespace is full and thus your insert statement fails? You need to inform the user so he/she can inform the DBA.
and at last this one:
[code]
WHEN Others THEN
Text_IO.Fclose(in_file);
END;
[/code]
You are hiding all possible exceptions; it might be a numeric or value error as the line you are reading is longer then your line buffer, or $add_any_possible_exception_here. You only close the file and behave like nothing ever happened. If you need to close your text file in any case it should look like this:
[code]
exception
when others then
if text_io.is_open(in_file) then
text_io.fclose(in_file);
end if;
raise;
end;
[/code]
By that you are closing the file if necessary (the exception might occur after you closed the file and closing it again will cause another exception), and reraise your exception so it can be processed by the higher element in the call stack; maybe your calling procedure expects some exceptions in your procedure too and handles them respectively. If no one in the call stack expects the exception and traps it, it finds it's way to the end user (who is you in that case). If it throws an exception take a look where it happens and take actions.
So remove your when others exceptions and look if some other exceptions occur. By now there might occur an exceptions but as you are hiding them all we and you have no clue about if, when, why and where it happens. Remove / replace the exception handlers as shown and you should get a clue about if, when, why and where.
cheers -
Error while setting data into table
I am getting an error while inerting a new record into table
error is
JBO-27010: Attribute set with value 9991431 for AckmntInd in EdMsgHeaderDetailsEO has invalid precision/scale oracle.jbo.AttrSetValException: JBO-27010: Attribute set with value 9991431 for AckmntInd in EdMsgHeaderDetailsEO has invalid
and followed by
java.lang.ArrayIndexOutOfBoundsException: 20 at oracle.jbo.server.ViewRowStorage.getViewAttributeDef
help to fix this error is appreciated !!
thanks,
Message was edited by:
user447047
Message was edited by:
user447047As you have mentioned following error...
JBO-27010: Attribute set with value 9991431 for AckmntInd in EdMsgHeaderDetailsEO has invalid precision/scale oracle.jbo.AttrSetValException:
It comes when you are trying to insert a value to an attribute whose DB width is less then the value supplied.
For example If corresponding value of Number(2) is 123, then JBO-27010 will be thrown.
Change it in either place.
Atal -
Error in inserting data into tables... '/'
I am trying to use cfhttp to create a query out of a text
file and then loop
and insert it into a database. Easy enough and works fine.
However, I am
getting a forward slash in some of the fields which is
causing an error.
'SOUTH OF SOUTH BLVD AND EAST OF BEACH RD\'
It is being entered into a LONGTEXT field in MySQL 5. Any way
to get the '\'
to be ignored and just be entered?
Here is my script block:
<cfhttp timeout="3600" url="
http://www.bpoprosonline.com/property/#ResFile#"
method="GET" name="Property" delimiter="|" textqualifier=""
firstrowasheaders="yes" />
<cfloop query="Property">
<cfquery name="loopProperty" datasource="bpopros">
Insert Into Property
(MLSNumber, ListOfficeCompany, ListOfficeId, Basement, Baths,
BFK_Dimen,
BR2_Dimen, BR3_Dimen, BR4_Dimen, BR5_Dimen, City, County,
Din_Dimen,
Directions, Directions_E_W, Directions_N_S, East_West,
Fam_Dimen, Fireplace,
Garage, Grt_Dimen, Kit_Dimen, Lib_Dimen, ListPrice,
Liv_Dimen, Lot_Dimen,
MBR_Dimen, No_Bedrooms, North_South, Remarks1, Remarks2,
Remarks3, Remarks4,
Remarks5, Remarks6, School_District, State, Street_Dir,
StreetName,
StreetNumber, SummerTax, Tot_Baths, Tot_Lavs,
Tot_Square_Feet, Winter_Tax,
Year_Built, Zip5, Appliances, Basement_Type, Bath_Desc,
Cooling, Exterior,
Foundation, Garage_Type, Heating, Other_Rooms, Site_Desc,
Style, PhotoURL,
DisplayAddress, Agent, weight)
VALUES
<cfif #MLSNumber# EQ
"">0<cfelse>#MLSNumber#</cfif>,
'#ListOfficeCompany#',
<cfif #ListOfficeId# EQ
"">0<cfelse>#ListOfficeId#</cfif>,
'#Basement#',
<cfif #Baths# EQ
"">0<cfelse>#Baths#</cfif>,
'#BFK_Dimen#',
'#BR2_Dimen#',
'#BR3_Dimen#',
'#BR4_Dimen#',
'#BR5_Dimen#',
'#City#',
'#County#',
'#Din_Dimen#',
'#Directions#',
'#Directions_E_W#',
'#Directions_N_S#',
'#East_West#',
'#Fam_Dimen#',
'#Fireplace#',
'#Garage#',
'#Grt_Dimen#',
'#Kit_Dimen#',
'#Lib_Dimen#',
<cfif #ListPrice# EQ
"">0<cfelse>#ListPrice#</cfif>,
'#Liv_Dimen#',
'#Lot_Dimen#',
'#MBR_Dimen#',
<cfif #No_Bedrooms# EQ
"">0<cfelse>#No_Bedrooms#</cfif>,
'#North_South#',
'#Remarks1#',
'#Remarks2#',
'#Remarks3#',
'#Remarks4#',
'#Remarks5#',
'#Remarks6#',
'#School_District#',
'#State#',
'#Street_Dir#',
'#StreetName#',
'#StreetNumber#',
'#SummerTax#',
<cfif #Tot_Baths# EQ
"">0<cfelse>#Tot_Baths#</cfif>,
<cfif #Tot_Lavs# EQ
"">0<cfelse>#Tot_Lavs#</cfif>,
<cfif #Tot_Square_Feet# EQ
"">0<cfelse>#Tot_Square_Feet#</cfif>,
'#Winter_Tax#',
<cfif #Year_Built# EQ
"">0<cfelse>#Year_Built#</cfif>,
<cfif #Zip5# EQ "">0<cfelse>#Zip5#</cfif>,
'#Appliances#',
'#Basement_Type#',
'#Bath_Desc#',
'#Cooling#',
'#Exterior#',
'#Foundation#',
'#Garage_Type#',
'#Heating#',
'#Other_Rooms#',
'#Site_Desc#',
'#Style#',
'#PhotoURL#',
'#DisplayAddress#',
0,
<cfif #ListOfficeId# EQ
340169>1<cfelse>0</cfif>)
</cfquery>
</cfloop>
Thanks
Wally Kolcz
MyNextPet.org
Founder / Developer
586.871.4126It seemed to have worked. I managed to loop and insert 55,345
records
without a hitch. I may move it to a cfqueryparam and see if
that works too.
"Dan Bracuk" <[email protected]> wrote in
message
news:fc1r5n$dal$[email protected]..
> What happened when you tried it? Did you have a similar
problem with
> apostrophes?
>
> cfqueryparam will probably escape all the weird
characters you are likely
> to encounter. -
Error while loading data into BW using Datastage tool
We are extracting data from external source and loading it into SAP BW using Ascential DataStage. Sometimes the job starts on the DataStage side but doesn't really run. I get the following error msg on the BW side:
S:RSVAR:051 Error opening InfoSource file: ZTESTODS_TRANSACTION.TXT
Please suggest.
Thanks,
RRHi,
ZTESTODS_TRANSACTION.TXT and ZTESTODS_TRANSACTION.MET are two files in the dsbwconnections directory on the datastage server. The error occurs when a process has a lock on the file.
If you use PUSH or PULL then you won't see the problem.
Best regards
Niels -
Error while inserting record into database using BPEL
I am trying to read from an xml file using a File Adapter and insert the values read into a database (by invoking a database adapter).
I formed the BPEL Process in the following manner:
1.Receive activity to receive the values read from the file
2.Assign activiuty to assign the values read to the Database input variable
3.Invoke activity to invoke the Database adapter.
The process deploys fine although with a warning : Trying to assign incompatible types.
But when the process is executed, it is faulting at the invoke stage.
The error i am getting is :
<messages><input><InvokeDBInput><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="EmployeesCollection"><EmployeesCollection xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/SaveToDB">
<ns0:Employees xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/filetoDB D:\Smita\Software\jdevstudio10133\jdev\mywork\FileToDatabase\filetoDB\emp.xsd" xmlns="http://xmlns.oracle.com/filetoDB" xmlns:ns0="http://xmlns.oracle.com/pcbpel/adapter/db/top/SaveToDB">
<Name>John Smith</Name>
<Email>[email protected]</Email>
<Department>Finance</Department>
<Designation>Accountant</Designation>
<Grade>5</Grade>
</ns0:Employees>
</EmployeesCollection>
</part></InvokeDBInput></input><fault><bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="code"><code>null</code>
</part><part name="summary"><summary>file:/D:/product/10.1.3.1/OracleAS_1/bpel/domains/default/tmp/.bpel_FileToDBTest1_3.5_1558cd90a5c3c9708cd747f1b3638054.tmp/SaveToDB.wsdl [ SaveToDB_ptt::insert(EmployeesCollection) ] - WSIF JCA Execute of operation 'insert' failed due to: Mapping Not Found Exception.
The mapping [Name] for descriptor [class bpel___localhost_default_FileToDBTest1_3_5__MD5_02e1d439ab7f9c7430b64c2a306ee77c_.SaveToDB.Employees] could not be found. The input xml record had an element [Employees/Name].
; nested exception is:
ORABPEL-11627
Mapping Not Found Exception.
The mapping [Name] for descriptor [class bpel___localhost_default_FileToDBTest1_3_5__MD5_02e1d439ab7f9c7430b64c2a306ee77c_.SaveToDB.Employees] could not be found. The input xml record had an element [Employees/Name].
Make sure that the input xml is valid relative to the xsd and that the mapping exists in the Mappings.xml. If an old version of the descriptor without this mapping has been loaded by the database adapter, you may need to bounce the app server. If the same descriptor is described in two separate Mappings.xml files, make sure both versions include this attribute/mapping.
</summary>
</part><part name="detail"><detail>null</detail>
</part></bindingFault></fault></messages>
The xml and xsd files i have used are these:
XML File (Employee.xml ) :
<?xml version="1.0" encoding="UTF-8"?>
<person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/filetoDB D:\Smita\Software\jdevstudio1013\jdev\mywork\FileToDatabase\filetoDB\emp.xsd" xmlns="http://xmlns.oracle.com/filetoDB">
<Name>John Smith</Name>
<Email>[email protected]</Email>
<Department>Finance</Department>
<Designation>Accountant</Designation>
<Grade>5</Grade>
</person>
Schema file : (emp.xsd) :
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://xmlns.oracle.com/filetoDB"
xmlns="http://xmlns.oracle.com/filetoDB"
elementFormDefault="qualified">
<xs:element name="person">
<xs:complexType>
<xs:sequence>
<xs:element name="Name" type="xs:string"/>
<xs:element name="Email" type="xs:string"/>
<xs:element name="Department" type="xs:string"/>
<xs:element name="Designation" type="xs:string"/>
<xs:element name="Grade" type="xs:integer"/>
</xs:sequence>
</xs:complexType>
</xs:element></xs:schema>
can someone help me out?I figured where i was going wrong...added a transform activity after the assign activity to map the file input fieds to the database columns. Now it works fine.
-
Error while wrting data into file using Applescript
am using the below script for writing the file, but sometimes am getting errors like mentioned below, pls suggest..
set filepath to POSIX path of "Macintosh HD:Library:Application Support:Macromedia:mms.cfg"
try
tell application "System Events"
if file filepath exists then
set myFile to open for access file filepath with write permission
set fileData to read myFile
set eof myFile to 0
write "blah blah" to myFile
close access myFile
else
return "File Not Found"
end if
end tell
on error
return false
end try
Error:
"Network file permission error." number -5000 from file "Macintosh HD:Library:Application Support:Macromedia:mms.cfg"
Also some times i will get this error, am unable to close the opened file
"File file Macintosh HD:Library:Application Support:Macromedia:mms.cfg is already open." number -49 from file "Macintosh HD:Library:Application Support:Macromedia:mms.cfg"
When i tried to close the ofile am getting this eror:
on openAFile(filepath)
try
set fp to open for access filepath with write permission
on error errstr number errNum
if errNum = -49 then
close access filepath
set fp to open for access filepath with write permission
else
display dialog errstr
return false
end if
end try
return fp
end openAFile
set pointer to openAFile("Macintosh HD:Library:Application Support:Macromedia:mms.cfg"
set fileContents to read pointer
Error
"Can’t make \"Macintosh HD:Library:Application Support:Macromedia:mms.cfg\" into type file." number -1700 from "Macintosh HD:Library:Application Support:Macromedia:mms.cfg" to fileif you're using HFS (colon-delimited) file paths, then you always have to prefix it with the file or alias keywords. If you don't, Applescript will see it as a plain sting rather than a file path. You can use POSIX (slash-delimited) paths directly. examples:
set filepath to POSIX path of file "Macintosh HD:Library:Application Support:Macromedia:mms.cfg"
set fp to open for access alias filePath with write permission -
Error while insert data using execute immediate in dynamic table in oracle
Error while insert data using execute immediate in dynamic table created in oracle 11g .
first the dynamic nested table (op_sample) was created using the executed immediate...
object is
CREATE OR REPLACE TYPE ASI.sub_mark AS OBJECT (
mark1 number,
mark2 number
t_sub_mark is a class of type sub_mark
CREATE OR REPLACE TYPE ASI.t_sub_mark is table of sub_mark;
create table sam1(id number,name varchar2(30));
nested table is created below:
begin
EXECUTE IMMEDIATE ' create table '||op_sample||'
(id number,name varchar2(30),subject_obj t_sub_mark) nested table subject_obj store as nest_tab return as value';
end;
now data from sam1 table and object (subject_obj) are inserted into the dynamic table
declare
subject_obj t_sub_mark;
begin
subject_obj:= t_sub_mark();
EXECUTE IMMEDIATE 'insert into op_sample (select id,name,subject_obj from sam1) ';
end;
and got the below error:
ORA-00904: "SUBJECT_OBJ": invalid identifier
ORA-06512: at line 7
then when we tried to insert the data into the dynam_table with the subject_marks object as null,we received the following error..
execute immediate 'insert into '||dynam_table ||'
(SELECT887684 wrote:
ORA-00904: "SUBJECT_OBJ": invalid identifier
ORA-06512: at line 7The problem is that your variable subject_obj is not in scope inside the dynamic SQL you are building. The SQL engine does not know your PL/SQL variable, so it tries to find a column named SUBJECT_OBJ in your SAM1 table.
If you need to use dynamic SQL for this, then you must bind the variable. Something like this:
EXECUTE IMMEDIATE 'insert into op_sample (select id,name,:bind_subject_obj from sam1) ' USING subject_obj;Alternatively you might figure out to use static SQL rather than dynamic SQL (if possible for your project.) In static SQL the PL/SQL engine binds the variables for you automatically.
Maybe you are looking for
-
Hi Guys, I am new to CPM and had no training, but I was wondering if you can create KPIs for each year as opposed to Period. All my test system options seem to point to Period - Current, Target etc. via the 'Initial Period' & 'Initial Target Period'
-
Availability of adobe acrobat pro for mobile,Mac OS system & Androids?
Is adobe acrobat pro available for mobile,Mac OS system & Androids?
-
Experts, We are in ahead of Archiving project in SAP. I want to know, how I could find size of Database tables under Objects. For eg . Object MM_EKKO under that there many database table (A068,A081 etc) I want to know size of that database table. I k
-
JavaFX application crashes after RedHat updated.
Hi, I have a JavaFX application which was working fine until a couple of days over Red Hat 6 Workstation + JDK 1.7.0_25. After the installation of Red Hat updates, the app fails when i try to launch it: # A fatal error has been detected by the Java R
-
Hide/Unhide a calendar from an AppleScript program
Is there a way for an AppleScript program to hide/show a particular calendar in iCal V4.0.3? There's a checkbox right next to the name of the calendar that does exactly what I want -- with the mouse. I'd like to control that checkbox from an AppleScr