Capture object in Siebel using Oracle ATS
Hi,
I hope some one can help me.
Is it possible to capture the data of a particular record in Siebel form applet and list applet using either of the object test/ table test?
Im also having the issue that path of List applet is not detected while operating in the capture mode. How can i get the path and data for a particular record in both the form applet and list applet?
Thanks in advance.
Hello
Have you ran an OpenScript diagnostic? (Help -> Diagnostic tool) to check everything is correct?
Have you created a siebel functional test script?
To get the content of a textfield, you should right clic, add -> other and find out the type of object you want to capture the text on:
Text -> Store Attribute
or
View Applet -> Store Attribute
It's always the Store Attribute function that you need to use once you know the type of object.
To discover the type of object and the attribute name, you can use the object test as described in the Alex blog.
But if you can't capture any Siebel action, you have a problem and you won't be able to store the attribute....
Something's wrong.
Can you see in your script somewhere after the login the function : SiebelFTInit?
Cheers
JB
Similar Messages
-
ADF View Object query to use Oracle LONG data type
Hi,
I'm using a view object that uses Oracle LONG data type.The following exception is thrown
*"java.sql.SQLException: Stream has already been closed"* and it is not fetching the correct data.
I have searched in many forums,they suggested to use LOB instead of LONG as LONG is deprecated. But in my case I can't avoid using LONG as some of my legacy applications using the same DB.
Please suggest me a way
Thanks in Advance
FelixThanks for your reply Arun,
I have solved this problem using the solution suggested by this blog [AskTom-Link|http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:839298816582]
In the above blog link,they have suggested to convert Long to Varchar by functions and asked to use this function in the column.
Thank you all guys who have seen this post.
Regards,
Felix -
Business Objects Password reset via Oracle SQL
Post Author: Neville
CA Forum: Administration
Hello ,
Is it possible to reset a Business Objects user Password using Oracle SQLPlus?
The password data is stored under obj_m_actor in the repository!
Regards,What do you mean by "application"?We do have a number of home grown applications that require username, and password.
Some of these application use the standard ldap username/password. So resetting the password here may also reset other application passwords as well. Yet some of our application have their own unique way of resetting the password for the application. I am hoping to copy the way that a sys admin usually does this and replicate it using java. Some are command line, other are through the use of a tool used by the application. So far I have been able to replicate most of them using java. I am still working on 1 other. 5 out of 6 not bad. Anyway, we would like to go to one place to reset the password for a user, and then email that temp password to them. Of course we will have some sort of authentication to change the password, such as unique questions they must answer, etc... -
Capture Changes from Sql Server using Oracle Streams - Destination Oracle
Is it possible to capture changes made to tables in Sql Server database and propagate the changes to Oracle Database using Oracle Streams and Heterogeneous Gateway. I see plenty of information about pushing data from Oracle to Sql server, but I haven't been able to find much information about going the other way. Currently we are using sql server 2005 replication to accomplish this. We are looking into the possibility of replacing it with streams.
the brief understanding i have is that there is nothing out of the tin that Oracle provides to stream between SQL Server and Oracle. The senario is documented in Oracle docs however and says you need to implement the SQL Server side to grabe changes and submit to Oracle stream queues.
i'm sure i've seen third parties who sell software to do this.
If you know otherwise please let me know. Also wasn;t aware one could push from SQL Server to Oracle. Is this something only avail in SQL Server 2005 or does 200 also have it? How are you doing this?
Cheers -
Using oracle.sql.STRUCT to pass in a COMPLEX OBJECT
I need to pass in a complex object (object with nested array of objects) into a oracle stored procedure.
We are using JDBC 9.2.0.1 drivers...
Note i am able to retrieve a complex object successfully using an oracle struct however i am not able to pass in the struct.
I do not want to use JPublisher as we are not using SQLJ.
I have looked through the documentation on using default structs and am getting an error when i try and create the struct...
I have created an array of objects with a sub array
and i create a struct descriptor however when i create the actual oracle struct
like
oracle.sql.Struct = new oracle.sql.Struct( structDesc,conn,complexobject)
I get a "java.sql.SQLException: Internal Error: Unable to resolve name"
Do i have to create STRUCTS for the nested object first ?
And then nest that STRUCT within the PARENT STRUCT to pass in complex objects ???
Any help would be much appreciated...
Gurinder
email [email protected]Thanks Konstantin Goryachev!
I'm using Oracle JDBC 9.2.0.3 drivers using a SQLData implementation.
Unfortunately i have something very similar to your code and i still get the following error
EXC: testPolicyRate(): java.sql.SQLException: Internal Error: Inconsistent catalog view
java.sql.SQLException: Internal Error: Inconsistent catalog view
void oracle.jdbc.dbaccess.DBError.throwSqlException(java.lang.String, java.lang.String, int)
DBError.java:187
void oracle.jdbc.dbaccess.DBError.throwSqlException(int, java.lang.Object)
DBError.java:229
void oracle.sql.StructDescriptor.initMetaData1_9_0()
StructDescriptor.java:897
void oracle.sql.StructDescriptor.initMetaData1()
StructDescriptor.java:864
boolean oracle.sql.StructDescriptor.isInstantiable()
StructDescriptor.java:508
void oracle.sql.STRUCT.<init>(oracle.sql.StructDescriptor, java.sql.Connection, java.lang.Object[])
STRUCT.java:107
oracle.sql.STRUCT oracle.sql.OracleSQLOutput.getSTRUCT()
OracleSQLOutput.java:96
oracle.sql.STRUCT oracle.sql.STRUCT.toSTRUCT(java.lang.Object, oracle.jdbc.OracleConnection)
STRUCT.java:408
oracle.sql.Datum oracle.jdbc.oracore.OracleTypeADT.toDatum(java.lang.Object, oracle.jdbc.driver.OracleConnection)
OracleTypeADT.java:284
oracle.sql.Datum[] oracle.jdbc.oracore.OracleTypeADT.toDatumArray(java.lang.Object, oracle.jdbc.driver.OracleConnection, long, int)
OracleTypeADT.java:327
oracle.sql.Datum[] oracle.jdbc.oracore.OracleTypeUPT.toDatumArray(java.lang.Object, oracle.jdbc.driver.OracleConnection, long, int)
OracleTypeUPT.java:143
oracle.sql.Datum[] oracle.sql.ArrayDescriptor.toOracleArray(java.lang.Object, long, int)
ArrayDescriptor.java:771
void oracle.sql.ARRAY.<init>(oracle.sql.ArrayDescriptor, java.sql.Connection, java.lang.Object)
ARRAY.java:118
void com.tu.lib.busobject.PolicyRate.main(java.lang.String[])
PolicyRate.java:198
Process exited with exit code 0.
Here's my code
* Main Method
public static void main(String[] args)
throws SQLException, IOException
Connection conn = null;
OracleCallableStatement cstmt = null;
try {
/* Setup connection */
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
conn = DriverManager.getConnection("jdbc:oracle:thin:@neptune:1521:tu_test", "OPS$WWW", "welcome1");
conn.setAutoCommit(false);
System.out.println("conn is open = " + !conn.isClosed());
/* Setup map */
System.out.println("Creating type maps...");
java.util.Map typeMap = conn.getTypeMap();
typeMap.put(_SQL_NAME,PolicyRate.class);
typeMap.put(CoverageRate._SQL_NAME, CoverageRate.class);
typeMap.put(CoverageRate._SQL_ARRAY_NAME,CoverageRate[].class);
conn.setTypeMap(typeMap);
/* Create a coverage rate object to be inserted into array of policy rate object */
CoverageRate covrObj = new CoverageRate(1,
"HMS",
30,
5,
new BigDecimal(0),
null,
null,
new BigDecimal(0),
new BigDecimal(0),
0,
0);
/* Create an array */
System.out.println("Creating descriptor...");
ArrayDescriptor adesc = new ArrayDescriptor(CoverageRate._SQL_ARRAY_NAME,conn);
System.out.println("Created descriptor!");
Object [] covrArray = new Object[1];
covrArray[0] = covrObj;
System.out.println("Creating oracle array..");
ARRAY arr = new ARRAY(adesc,conn,covrArray);
System.out.println("Created array!!");
/* Create policy rate object */
PolicyRate prate = new PolicyRate ("TESTTRA",
"TRS",
TUDate.convertToSql("2003","08","27"),
TUDate.convertToSql("2004","06","25"),
TUDate.convertToSql("2004","06","29"),
"NEW",
1,
new BigDecimal(0),
new BigDecimal(0),
null);
/* Add coverage rate object to array -- assume array only has one element for timebeing */
System.out.println("Setting arr in policyrate...");
prate.setRates(arr);
System.out.println("Creating array.sql.ARRAY for covrObj..");
prate.setRates(new oracle.sql.ARRAY(adesc,conn,covrObj));
System.out.println("Created array.sql.ARRAY for covrObj..");
/* Setup statemenet object */
cstmt = (OracleCallableStatement) conn.prepareCall("{call dbpckg_rate_obj.p_rate_obj_calc_rate(?)}");
/* Bind variables to statement */
System.out.println("Setting policyrate object...");
cstmt.setObject(1,prate,OracleTypes.STRUCT);
System.out.println("Registering out object...");
cstmt.registerOutParameter(1,oracle.jdbc.OracleTypes.STRUCT,PolicyRate._SQL_NAME);
cstmt.execute();
/* Retrieve the object back */
System.out.println("Getting policy rate object back...");
prate = (PolicyRate) cstmt.getObject(1);
System.out.println("Object Retrieved " + prate.getProductcode() + " " + prate.getAgentcode());
/* Close database connection */
conn.close();
catch (Exception exc) {
System.out.println("EXC: testPolicyRate(): " + exc);
exc.printStackTrace();
if (conn != null)
conn.close();
finally {
if (conn != null)
conn.close();
I've opened up a tar through metalink hopefully they can help get past this error...:)
Gurinder -
Unable to create Target for siebel 8.1.1 using Oracle Application Adapter
Hi,
I am unable to connect to siebel application using Oracle Application Adpater for weblogic server.Details are as follows
OS - Linux x86
Weblogic - 10.3.3
SOA - 11.1.1.3
Siebel - 8.1.1
When tried to create target following error is thrown
"Error getting targer[Siebel] - Invalid or incomplete string .(SBL- JCA - 00301)"
Can any body help me to resolve this issue.
Regards
Srinivas PusaHi,
There is definitely a table called HSP_LOCK in the planning applications repository, are you sure you are looking in the correct place.
Anyway there is also a utility (HspUnlockApp) in the \planning\bin directory that should unlock the app and will save you having to mess around with any tables, more details :- http://download.oracle.com/docs/cd/E12825_01/epm.111/hp_admin/ch04s02.html
Cheers
John
http://john-goodwin.blogspot.com/ -
Capturing error messages from Oracle EBS APIs when using Oracle Apps Adapter
We are using Oracle applications adapter to call Oracle EBS (both R11.5 and R12) APIs. I want to understand the best practice around error handling when using Oracle Apps Adapter to call Oracle EBS.
Here are some observations:
1. Most of the APIs return X_RETURN_STATUS and X_MSG_DATA containing the status and messages if any.
2. If the MSG COUNT is 1 then X_MSG_DATA contains the message, if MSG COUNT is > 1. X_MSG_DATA is empty.
We know that when calling the API directly from PL/SQL, we need to loop through FND_MSG_PUB to fetch all messages when there are more than 1. How do we achieve the same using Apps Adapter as Apps Adapter generates the PL/SQL block to call the API dynamically at runtime.
In some APIs, which have table/rec types as input or output parameters, Apps Adapter generates a wrapper package to do conversion from SQL--> PL/SQL and viceversa. In this case the adapter calls the custom package generated which internally calls the API. For these APIs we were able to put the logic to loop through FND_MSG_PUB and return a concatenated string as value of X_MSG_DATA.
But what should we do for the APIs which do NOT have a rec/table type as input or output, in which case the Apps Adapter directly calls the API and there is no intermediate custom package?
How are others handling this?Please see the section "Handling Functional Errors" in the below link
Oracle Fusion Middleware Adapter for Oracle Applications User's Guide -
ORA-04031-----capture aborat in stream in oracle 10g R2 in win 2003
Hi Experts,
Error Message ORA-04031: unable to allocate 116 bytes of shared memory ("streams pool","unknown object","streams pool","kolcalm coll")
I got this message for capture ABORTED. my sga_target and sga_max as 1880M. Do I need to increase their size? stream pool size as 880. shared_pool_reserved_size as 14M.
Based on oracle document for this error message:
Action: If the shared pool is out of memory, either use the dbms_shared_pool package to pin large packages, reduce your use of shared memory, or increase the amount of available shared memory by increasing the value of the INIT.ORA parameters "shared_pool_reserved_size" and "shared_pool_size". If the large pool is out of memory, increase the INIT.ORA parameter "large_pool_size".
Key point: we use asm to control. it include share_pool and large_pool. Do we need to increase share pool size?
Or we need to take other steps to handle this point.
Thanks for help!!
regards
Jim
Edited by: user589812 on Nov 24, 2008 9:02 AMSorry. I use Oracle 10GR2 in window 2003
For you sql results as
STREAMS_POOL_SIZE_FOR_ESTIMATE STREAMS_POOL_SIZE_FACTOR ESTD_SPILL_COUNT ESTD_SPILL_TIME ESTD_UNSPILL_COUNT ESTD_UNSPILL_TIME
272 .1828 66034094 49261 72443892 114732
424 .2849 56899900 42916 69761439 110546
576 .3871 29490067 17904 56631824 87657
728 .4892 23989724 13951 55330937 85704
880 .5914 20168762 11552 54131928 83935
1032 .6935 16931737 9668 52998667 82269
1184 .7957 14147340 8134 51948431 80724
1336 .8978 11706951 6797 51052796 79408
1488 1 9679293 5687 50314492 78322
1640 1.1022 8051240 4800 49768913 77520
1792 1.2043 6747253 4087 49361033 76921
STREAMS_POOL_SIZE_FOR_ESTIMATE STREAMS_POOL_SIZE_FACTOR ESTD_SPILL_COUNT ESTD_SPILL_TIME ESTD_UNSPILL_COUNT ESTD_UNSPILL_TIME
1944 1.3065 5699093 3515 49064019 76483
2096 1.4086 4829584 3040 48850903 76171
2248 1.5108 4089840 2638 48682591 75923
2400 1.6129 3425461 2278 48542520 75717
2552 1.7151 2815554 1949 48417853 75535
2704 1.8172 2267859 1648 48297317 75357
2856 1.9194 1865779 1427 48178756 75183
3008 2.0215 1678078 1315 48063018 75014
3160 2.1237 1637930 1277 47943171 74838
I am waiting for your help!
JIm -
Oracle ATS Workflow and Validation process.
Hi,
Can any one know how Oracle ATS supports Workflow and Validation functionalities, or is there any plug-in's available to handle this feature.
Please post your valuable suggestions,
Thanks in Advance,
Ramesh.Hi Rick/Rob,
Thank you for your Suggestions/advice,I will try inheriting it in my future developments.
I have iterated the complete requirement and reasons for why the Workflow is put into an error state.
In most of the scenarios (in my project) the users/agents are allowed to restart the workflows.This is already in place and have been followed hence would try to simulate Rob's suggestions and would keep you posted on it.
But w.r.t current issue it seems to be still pending.
While creating an Service entry sheet for cost objects at the validation stage the SES would be waiting for confirmation for its approval from its valid approvers if they do not find the approvers the workflow is passed to an error state , post validation the user id provided with a link where he could restart the workflow(this is already been followed and has been working well ad people are used with this process)
SES approver determination sequence:
firstly the program will check partner function users Z1 or Z2 in PO, then if it has error it checks requisitioner of PO. In requisitioner check additional check we applied for validating PO creator is from Batch Id, if yes then email is triggered at functional mailbox with the link.
Screenshots:
So till here its been a legacy process what is been followed. But now my actual issue was how to access SWPR from web or from an hyperlink.
I am able to access SWNWIEX transaction but not SWPR.
So if you have come across or have worked any such scenarios kindly let me know so that I can implement this in my workflow.
Apologies for not following the right process ,as I said earlier I ll try simulating the same workflow as per your advice and present it before the counterpart and try bringing a change in the existing process.
Thank you.
Regards,
Vivek -
Is there a Java SDK for Siebel Analytics/Oracle BI
Hi, I want to integrate with Siebel Analytics (now known as Oracle Business Intelligence, right?) to our product. Is there a JAVA SDK for Siebel Analytics/Oracle BI? If so, can anyone point me to the right place to get them. Much appreciated.
There is currently no JDK or any other API to work with OBI EE (formerly Siebel Analytics).
The presentation component exposes some functionality via web services.
You can interact with the BI Server via NQCMD so you could build your own application that executes NQCMDs but this is not well documented other than typing NQCMD ? at the command line.
The OBI Metadata is captured in a .rpd file which can be manipulated via UDML but this is not supported - do a search on Google for UDML (which is a proprietary format) for some examples on using this. OWB recently rolled out with some integration with OBI - it accomplishes this by manipulating the .rpd file using UDML.
The Oracle folks monitor this forum. If you can reply with some specifics as to what you want to accomplish, I'm sure they will consider your needs if they decide to publish an API. -
Not able to spy objects in ie9 using coded UI Test Builder Spy, giving exception - "Interface not registered(Exception from HRESULT:0X...."
I am not able to capture any objects of my web application using coded ui recorder. Even though it is a simple html page, coded ui is showing a message -"Interface not registered(Exception from HRESULT:0X...."
Please give me solution , why this is hapening. I am having problem with object identification. Even I am not able to identify any object in google.com.
swapnanil senguptaTechnologyName is displaying as "MSAA" . But my application is a Webapplication.If I try to spy the google .com's search field then also TechnologyName is displaying as "MSAA". Is it any configuration issue of vsts codedui.
swapnanil sengupta -
I am new to using Oracle, and I am trying to create an add/insert stored pr
I am new to using Oracle, and I am trying to create an add/insert stored procedure for a table. The PROD_CD and PLAN_CD fields in my table can have no value (empty or null) Can you please check my code and let me know what I am doing wrong?
Table definition:
CREATE TABLE DCWEB.USER_PLAN_PREFERENCE
USERID VARCHAR2(40) NOT NULL,
PROD_CD VARCHAR2(9) NULL,
PLAN_CD VARCHAR2(9) NULL,
STATE_LST VARCHAR2(2) NOT NULL,
STATE_NM VARCHAR2(40) NOT NULL,
LST_UPDATE_TS TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP NOT NULL
ALTER TABLE DCWEB.USER_PLAN_PREFERENCE
ADD CONSTRAINT USER_PLAN_PREFERENCE_XPK PRIMARY KEY (USERID, PROD_CD, PLAN_CD);
-- Grant/Revoke object privileges
grant select, insert, update, delete on DCWEB.USER_PLAN_PREFERENCE to HIGGIB1;
Stored Procedure Definition:
procedure setUserPlanPref (
userid in varchar2,
prod_cd in varchar2,
plan_cd in varchar2,
state_lst in varchar2,
state_nm in varchar2
is
currentTimestamp timestamp := current_timestamp;
begin
insert into user_plan_preference (userid, prod_cd, plan_cd, state_lst, state_nm, lst_update_ts)
values (upper(userid), upper(prod_cd), upper(plan_cd), upper(state_lst), upper(state_nm), currentTimestamp);
commit;
exception
when dup_val_on_index then
begin
update user_plan_preference up set
up.userid = upper(userid),
up.prod_cd = upper(prod_cd),
up.plan_cd = upper(plan_cd),
up.state_lst = upper(state_lst),
up.state_nm = upper(state_nm),
up.lst_update_ts = currentTimestamp
where up.userid = upper(userid)
and up.prod_cd = upper(prod_cd)
and up.plan_cd = upper(plan_cd);
commit;
exception
when others then
rollback;
end;
when others then
rollback;
end;
end;
INPUT DATA
I am unable to insert a record calling the stored procedure with values: DCWEB4578, , 2P, CA, CALIFORNIA but when I change to the string "NULL", the insert succeeds. When I try to call the stored procedure to update the inserted record with values: DCWEB4578, "NULL", 2P, CO, COLORODO the update does not happen since I still see the original record in the table. Please advise. Thanks in advance for your help.938319 wrote:
I am new to using OracleWelcome to the forum: please read the FAQ and forum sticky threads (if you haven't done so already), and ensure you've updated your profile with a real handle instead of "938319".
You'll get a faster, more effective response to your questions by including as much relevant information as possible upfront. This should include:
<li>Full APEX version
<li>Full DB/version/edition/host OS
<li>Web server architecture (EPG, OHS or APEX listener/host OS)
<li>Browser(s) and version(s) used
<li>Theme
<li>Template(s)
<li>Region/item type(s)
With APEX we're fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues, especially those relating to layout and visual formatting. If you expect a detailed answer then it's appropriate for you to take on a significant part of the effort by getting as far as possible with an example of the problem on apex.oracle.com before asking for assistance with specific issues, which we can then see at first hand.
Thanks for posting the complete code, it makes it so much easier to understand the problem, but always post code wrapped in tags<tt>\...\</tt> tags to preserve formatting and special characters.
and I am trying to create an add/insert stored procedure for a table.Does this have anything to do with APEX, for which this is the forum? General SQL & PL/SQL matters should be directed to the {forum:id=75} forum.
The PROD_CD and PLAN_CD fields in my table can have no value (empty or null) Can you please check my code and let me know what I am doing wrong?This:
commit;
exception
when others then
rollback;
end;
when others then
rollback;Remove it all.
Commits should be issued by end user/client software on completion of a transaction. This means <tt>commit;</tt> should almost never appear in PL/SQL code. The main exception to this is in <tt>dbms_job/secheduler</tt> scheduled processes that have no client or UI. If this code is executed from APEX, then APEX issues more than enough commits anyway.
exceptions are just a way of ensuring your code is buggy.<tt>when others</tt> exceptions are just a way of ensuring your code is buggy.
INPUT DATA
I am unable to insert a record calling the stored procedure with values: DCWEB4578, , 2P, CA, CALIFORNIA but when I change to the string "NULL", the insert succeeds. When I try to call the stored procedure to update the inserted record with values: DCWEB4578, "NULL", 2P, CO, COLORODO the update does not happen since I still see the original record in the table. Please advise. Thanks in advance for your help.With the <tt>commit</tt>s and <tt>when others...</tt> removed from the code you'll have a chance of seeing what's actually happening. Note that the entire procedure can be simplified by writing as a MERGE</tt> statement. -
How to use Oracle partitioning with JPA @OneToOne reference?
Hi!
A little bit late in the project we have realized that we need to use Oracle partitioning both for performance and admin of the data. (Partitioning by range (month) and after a year we will move the oldest month of data to an archive db)
We have an object model with an main/root entity "Trans" with @OneToMany and @OneToOne relationships.
How do we use Oracle partitioning on the @OneToOne relationships?
(We'd rather not change the model as we already have millions of rows in the db.)
On the main entity "Trans" we use: partition by range (month) on a date column.
And on all @OneToMany we use: partition by reference (as they have a primary-foreign key relationship).
But for the @OneToOne key for the referenced object, the key is placed in the main/source object as the example below:
@Entity
public class Employee {
@Id
@Column(name="EMP_ID")
private long id;
@OneToOne(fetch=FetchType.LAZY)
@JoinColumn(name="ADDRESS_ID")
private Address address;
EMPLOYEE (table)
EMP_ID FIRSTNAME LASTNAME SALARY ADDRESS_ID
1 Bob Way 50000 6
2 Sarah Smith 60000 7
ADDRESS (table)
ADDRESS_ID STREET CITY PROVINCE COUNTRY P_CODE
6 17 Bank St Ottawa ON Canada K2H7Z5
7 22 Main St Toronto ON Canada L5H2D5
From the Oracle documentation: "Reference partitioning allows the partitioning of two tables related to one another by referential constraints. The partitioning key is resolved through an existing parent-child relationship, enforced by enabled and active primary key and foreign key constraints."
How can we use "partition by reference" on @OneToOne relationsships or are there other solutions?
Thanks for any advice.
/MatsCrospost! How to use Oracle partitioning with JPA @OneToOne reference?
-
How to use oracle collection type with JDBC?
I try to use oracle collection type in java program. So I made some package and java program, however Java program was not found "package.collectiontype"(JDBC_ERP_IF_TEST.NUM_ARRAY) . please, show me how to use this.
Java Version : Java 1.4
JDBC Driver : Oracle Oci Driver
DB: Oracle 9i
No 1. Package
===========================================
create or replace package JDBC_ERP_IF_TEST AS
type NUM_ARRAY is table of number;
procedure JDBC_ERP_IF_ARRAY_TEST(P_NUM_ARRAY IN NUM_ARRAY, ERR_NO OUT NUMBER, ERR_TEXT OUT VARCHAR2);
procedure TEST(ABC IN NUMBER);
END JDBC_ERP_IF_TEST;
==================================================
No 2. Package Body
===============================================
CREATE OR REPLACE package BODY JDBC_ERP_IF_TEST is
procedure JDBC_ERP_IF_ARRAY_TEST(p_num_array IN NUM_ARRAY,
ERR_NO OUT NUMBER,
ERR_TEXT OUT VARCHAR2) is
begin
ERR_NO := 0;
ERR_TEXT := '';
dbms_output.enable;
for i in 1 .. p_num_array.count() loop
dbms_output.put_line(p_num_array(i));
insert into emp (empno) values (p_num_array(i));
commit;
end loop;
EXCEPTION
WHEN OTHERS THEN
ERR_NO := SQLCODE;
ERR_TEXT := ERR_TEXT ||
' IN JDBC INTERFACE TEST FOR ORACLE ERP OPEN API..';
ROLLBACK;
RETURN;
end JDBC_ERP_IF_ARRAY_TEST;
procedure TEST(ABC IN NUMBER) IS
begin
insert into emp(empno) values (ABC);
commit;
end TEST;
end JDBC_ERP_IF_TEST;
===============================================
NO 3. Java Program
===============================================
ArrayDescriptor descriptor = ArrayDescriptor.createDescriptor("JDBC_ERP_IF_TEST.NUM_ARRAY", getConnection());
ARRAY array = new ARRAY(descriptor, getConnection(), arrs);
cstmt = getConnection().prepareCall(LQueryFactory.getInstance().get("Meta/Basic/testJdbcErpArrayIf").getSql());
cstmt.setArray(1, array);
cstmt.registerOutParameter(2, Types.INTEGER);
cstmt.registerOutParameter(3, Types.VARCHAR);
====================================================
couldn't find this phase => JDBC_ERP_IF_TEST.NUM_ARRAY
what can i do for this package and program? please help me..Something like this:
create or replace type t_record as object (
id number,
no number
CREATE or replace type t_table AS TABLE OF t_record;
set serveroutput on
declare
v_table t_table := t_table();
v_t1 t_table := t_table();
begin
v_table.extend(1);
v_table(1).ID := 1;
v_table(1).No := 10;
v_table.extend(1);
v_table(2).ID := 2;
v_table(2).ID := 20;
SELEC t_record (ID,NO) BULK COLLECT INTO v_t1
from TableA
FROM TABLEA
WHERE ID IN (select t.ID from table(v_Table) t);
for i in 1..v_t1.count loop
dbms_output.put_line(v_t1(i).ID);
dbms_output.put_line(v_t1(i).No);
end loop;
end;
/Untested!
P;
Edited by: bluefrog on Mar 5, 2010 5:08 PM -
Looking for some help with using Oracle stored procedures in vb2010
First off thank you to whoever lends me a hand with my problem. A little background first I am in a software development class and we are currently building our program using VB (I have no experience in this), and Oracle(currently in a Oracle class so I know how to use Oracle itself just not with VB).
I am using vb2010 express edition if that helps. Currently I have a stored procedure that takes a 4char "ID" that returns a position (ie, salesperson,manager ect). I want to use the position returned to determine what vb form is displayed (this is acting as a login as you dont want a salesperson accessing the accountants page for payroll ect).
Here is the code I have currently on the login page of my VB form
Imports Oracle.DataAccess.Client
Imports Oracle.DataAccess.Types
Public Class Login
Dim conn As New OracleConnection
Private Sub empID_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles empID.Click
End Sub
Private Sub LoginBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LoginBtn.Click
conn.ConnectionString = "User ID = Auto" & _
";Password = ********" & _
";Data Source = XE"
conn.Open()
Dim sq1 As String = "Return_Position" 'name of procedure
Dim cmd As New OracleCommand(sq1, conn)
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.Add(New OracleParameter("I_EmpID", OracleDbType.Char, 4)).Value = Emp_ID.Text
Dim dataReader As OracleDataReader = cmd.ExecuteReader
dataReader.Read()
Dim position As New ListBox
position.Items.Add(dataReader.GetString(0)) 'were I am getting an error, I also tried using the dataReader.getstring(0) to store its value in a string but its a no go
If position.FindStringExact("MANAGER") = "MANAGER" Then
Me.Hide()
Dim CallMenu As New Menu()
CallMenu.ShowDialog()
End If
LoginBtn.Enabled = False
End Sub
I have read the oracle.net developer guide for using oracle in vb2010 and have successfully gotten through the document however they never use a stored procedure, since the teacher wants this program to user a layered architecture I cannot directly store sql queries like the document does, thus the reason I want to use stored procedures.
This is getting frustrating getting stuck with this having no background in VB, I could easily do this in c++ using file i/o even through it would be a pain in the rear....Hello,
I am calling Oracle 11g stored procedures from VB.Net 2010. Here is a code sample (based on your code) you should be able to successfully implement in your application.
Please note that you may have to modify your stored procedure to include an OUT parameter (the employee position) if it doesn't have it yet.
Private Sub LoginBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LoginBtn.Click
Dim sProcedureName As String = "Return_Position" 'name of stored procedure
Dim ORConn as OracleConnection, sConn as String
Dim sPosition as String, sDataSource as String, sSchema as String, sPWD as String
Dim cmd As OracleCommand
'please provide below sDataSource, sSchema and sPWD in order to connect to your Oracle DB
sConn = "Data Source=" & sDataSource & ";User Id=" & sSchema & ";Password=" & sPWD & ";"
ORConn = New OracleConnection(sConn)
ORConn.Open()
cmd = New OracleCommand(sProcedureName, ORConn)
With cmd
.CommandType = Data.CommandType.StoredProcedure
'input parameter in your stored procedure is EmpId
.Parameters.Add("EmpID", OracleDbType.Varchar2).Value = Emp_ID.Text
.Parameters.Item("EmpID").Direction = ParameterDirection.Input
'output parameter in your stored procedure is Emp_Position
.Parameters.Add("Emp_Position", OracleDbType.Varchar2).Direction = ParameterDirection.Output
.Parameters.Item("Emp_Position").Size = 50 'max number of characters for employee position
Try
.ExecuteNonQuery()
Catch ex As Exception
MsgBox(ex.Message)
Exit sub
End Try
End With
sPosition = cmd.Parameters.Item("Emp_Position").Value.ToString
'close Oracle command
If Not Cmd Is Nothing Then Cmd.Dispose()
Cmd = Nothing
'close Oracle connection
If Not ORConn Is Nothing Then
If not ORConn.State = 0 Then
ORConn.Close()
End If
ORConn.Dispose()
End If
ORConn = Nothing
If UCase(sPosition) = "MANAGER" Then
Me.Hide()
Dim CallMenu As New Menu()
CallMenu.ShowDialog()
End If
LoginBtn.Enabled = False
End Sub
If you need further assistance with the code, please let me know.
Regards,
M. R.
Maybe you are looking for
-
Control CRM- R/3 BP replication based on BP status
Hi Experts, In Our scenario all BP's created in CRM gets "Not released" flag by default. And it goes through a workflow cycle to release the flag. We want to replicate the BP's to R/3 only once the "Not released" flag is removed. Can you please shar
-
Sound Blaster X=Fi SB1090
My audio port on my mac recently stopped working so I decided to buy a usb sound card. The sound card works but I only have 2 channel audio and it says "this device has no output controls". This means I can not use the volume keys on my keyboard nor
-
How can attach a sales order link into an Internal Mail - Workplace.
Hello, is there somebody can give me some tips to do this. I need to attach a link of a sales order into a message of an internal mail (workplace). When a sales order is blocked by credit, one mail sent to the representative credit manager. The subje
-
OVM 3.2.1 + Sun ZFS - want to create second repository
Hi All, I am very new to this VM architecture. Our VM environment's repository exists in the Sun ZFS. I have created a similar LUN in the Sun ZFS Storage. But, I am not sure how to expose this to the VM Manager or the OVS so that I can create virtual
-
When browsing in private mode, I am unable to download any kind of files. Either from CNET or just a plain flash, the download function doesn't happen. Even if I right click and save as, nothing happens. I have to go back into normal mode to get the