FBean.Set_Property problem
I'm trying to set parameters on a applet in my Bean area.
In the html page for the applet the parameters are called in this way:
E.g.
document.viewONE.openFile("invoice.tif", 1);
And in my forms I try this:
FBean.register_bean('B1.BA1',1,'ji.applet.jiApplet');
FBean.Set_PropertyFBean.Set_Property('B1.BA1,1,'viewONE.openFile','"file://C:/Test/invoice.tif", 1');
Am I doing something wrong in the parameter call to the Applet from my form?
Very frustrating, I can see that the properties and methods are beeing invoked but it does not change in the loaded applet. Do I need to do some "refreash" of the loaded applet in the Bean Area after changing properties and invoking mehods. See java console output:
*** ji.applet.jiApplet Heavyweight bean ji.applet.jiApplet
*** ji.applet.jiApplet Applet bean ji.applet.jiApplet
*** ji.applet.jiApplet Setting pFileButtons to false
*** ji.applet.jiApplet Invoking setFileButtons
*** ji.applet.jiApplet Setting pFileMenus to false
*** ji.applet.jiApplet Invoking setFileMenus
*** ji.applet.jiApplet Setting mIsFileButtons to 0
*** ji.applet.jiApplet Invoking isFileButtons
*** ji.applet.jiApplet Got mIsFileButtons = false
*** ji.applet.jiApplet Setting mOpenFile$1 to notfound.tif
*** ji.applet.jiApplet Setting mOpenFile$2 to 1
*** ji.applet.jiApplet Setting mOpenFile to 0
*** ji.applet.jiApplet Invoking openFile
Similar Messages
-
FBean.register_bean Problems!
I have made my own bean class that I want to use in a BeanArea. But I get this error when I run the form.
*** VBean Setting beanName to lib.getPath
*** VBean Failed to instantiate class: lib.getPath java.lang.ClassCastException: lib.getPath
In the form I try to register the bean in this way.
FBean.register_bean('B1.BA1',1,'lib.getPath');
I have included the jar file with my bean in formsweb.cfg
archive_jini=f90all_jinit.jar,util.jar
Any idees what's wrong?I extended BeanWrapper in my bean class that did the trick.
-
This is not a question, it is a futile cry of helplessness, such as a 9 month old might make when they strike their head on a rock.
Consider:
'BLOCKA'.WHEN-NEW-BLOCK-INSTANCE:
FBean.Register_Bean('ITEMA', ALL_ROWS, 'my.TestBean');'BLOCKB'.WHEN-NEW-BLOCK-INSTANCE:
FBean.Register_Bean('ITEMB', ALL_ROWS, 'my.TestBean');And what happens? If BLOCKA is 'first', ITEMA is populated with the TestBean, but BLOCKB's ITEMB is not. Conversely, if BLOCKB is first, ITEMB is populated with the TestBean, but BLOCKA's ITEMA is not.
Happily, it doesn't matter to me today. But it would be fair to say that Forms and I are becoming estranged on a fairly brief aquiantance.Thanks Francois,
I am certainly feeling a bit alone in the Oracle Forms enhanced JavaBeans world, trying to get a PROPERTY_CHANGED_EVENT to bubble up from my bean into my form. [This Google Query|http://www.google.com.au/search?q=FBEAN+PROPERTY_CHANGED_EVENT&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-GB:official&client=firefox-a] for "FBEAN PROPERTY_CHANGED_EVENT" (both of which would appear on the FBEAN.ENABLE_EVENTS line) finds only my poor posts from yesterday.
I really, really dislike the legacy Forms JavaBeans approach. A JavaBean is all about properties and state. Something simple like 'background-color' is a good example. You should be able to simply:
FBEAN.SET_PROPERTY('My_Bean_Area', 'background-color', '#FFFFF');
which is equivalent to:
bean.backgroundColor = "#FFFFFF";
... and the same bean class is usable in both Java and Oracle Forms.
With the legacy Forms JavaBeans appraoch, you've got to write a wrapper class, AND you'd be forced to write something semantically nonsensical like:
:success = GET_CUSTOM_PROPERTY('My_Bean_Area', 'SETBACKGROUNDCOLOR', '#FFFFFF');
and the hapless monkey who's come to fix your broken code can't wrap his mind around why your'e using a getter to mutate the bean (or why you're returning a value from your setter, for that mattter).
(PS. I do not accuse YOU of such crimes, but i have inherited a codebase which would shock you. and the legacy Forms JavaBeans approach is largely to blame).
Anyhow. I guess I had better try to extract some sense from GET_CUSTOM_PROPERTY and friends instead of whining ...
cheers,
David. -
How to use the FBean package?
I really haven't a clue what i am doing but using the online help i constructed the following code in my forms "when-new-form-instance" trigger. I then created a bean item in my control block called 'MyBeanArea'. I ran the form and nothing happened, the bean area remained blank. How do i get this thing to work?
Thanks
Gus
Forms 10.1.2 on XP (standalone)
-- Java Beans
FBean.Register_Bean('control.MyBeanArea', 1, 'sunw.demo.juggler.Juggler');
fBean.Set_Property('control.MyBeanArea',1,'animationRate',150);
FBEAN.INVOKE('control.MyBeanArea',1,'startJuggling');Database 10g Express Edition on Win XP
Have downloaded Forms demo 10gr2 and have found that its not been updated and there appear to be lots of discrepancies in the install guide e.g.
The often referred to forms90 directory in the install notes is now called 'forms' in my installation I believe.
Modifying orion-web.xml as per installation notes means having to read between the lines e.g.
<classpath path="%ORACLE_HOME%/forms90/java/f90jdapi.jar" />
<classpath path="%ORACLE_HOME%\forms90\demos/metadatabrowser/classes" />
<virtual-directory virtual-path="/formsdemo" real-path="%ORACLE_HOME%\forms90\demos" />The first line is not a correct DOS path (Linux I assume) so this would not be valid would it? Also the 'forms90' directory is no longer valid, its 'Forms'.
Modifing the web.xml .....
<servlet>
<servlet-name>l90servlet</servlet-name>
<servlet-class>oracle.forms.servlet.ListenerServlet</servlet-class>
</servlet>had to replace l90servlet with lservlet (is this correct)
and a number of other similar incidences of this. Only half way through the guide and will finish off tomorrow. Following the install guide as best i can but am a little bit frustrated as i don't understand the changes i am making, ah well hey ho.
Funny thing is when i run the sample test in my browser which is a blue tick (tick.gif) I eventually got it to work by typing in the following
http://127.0.0.1:8889/forms/formsdemo/images/tick.gif[\code]
In the URL "/forms/formsdemo/images/tick.gif" is a directory path but i don't have a directiry called "formsdemo" so how come this seems to work???
Confused
Gus -
I would like to display JTable based bean in Oracle Forms 10g but I get:
*** VBean null PropertyManager for id = FOREGROUND
*** VBean Got FOREGROUND = null
*** VBean null PropertyManager for id = BACKGROUND
*** VBean Got BACKGROUND = null
*** VBean Setting debugMode to ALL
*** VBean Setting beanName to plusplus.PPCalendar
*** plusplus.PPCalendar Registering properties
*** plusplus.PPCalendar int pWidth
*** plusplus.PPCalendar int pDebugGraphicsOptions
*** plusplus.PPCalendar int pHeight
*** plusplus.PPCalendar boolean pOpaque
*** plusplus.PPCalendar javax.swing.InputVerifier pInputVerifier
*** plusplus.PPCalendar Failed to introspect class: class plusplus.PPCalendar java.lang.NullPointerExceptionPPCalendar's code:
public class PPCalendar extends JPanel
private JTable table;
private DefaultTableModel model;
private JScrollPane jsp;
public PPCalendar() {
super();
model = new DefaultTableModel( new String[] [] { {"1x1", "1x2"}, {"2x1", "2x2"}}, new String [] {"First", "Second"});
table = new JTable(model);
jsp = new JScrollPane(table);
jsp.setAutoscrolls(true);
this.add(jsp);
this.setVisible(true);
public void setHead(String nes) {
String val1 = (String) model.getValueAt(0,0);
System.out.println("val1: " + val1);
public String getHead() {
return (String) model.getValueAt(0,0);
}Setting property ( fbean.set_property('tb.ptable', 1, 'head', 'Blah');) fails, but I can set properties (introspection still fails) if I try something similar with:
package plusplus;
//import java.awt.Panel;
//import java.awt.Label;
import javax.swing.JPanel;
import javax.swing.JLabel;
public class Simple extends JPanel {
private JLabel naziv = new JLabel();
public Simple() {
try {
jbInit();
} catch(Exception e) {
e.printStackTrace();
private void jbInit() throws Exception {
naziv.setText("XXX");
this.add(naziv, null);
public void setNaziv(String tekst) {
naziv.setText(tekst);
}What am I doing wrong? Are there some "more advanced" swing based bean examples?
Is there some kind of documentation on oracle.ewt.* and Dynamic Bean Manager?The problem is that you're extending JPanel - the issue is not your fault (or ours for that matter) it's a problem in the base JPanel class which causes a NPE when introspecting the properties that it exposes because it does not conform to the JavaBeans Spec.
We've put a WorkAround into the FBean code in Forms 10.1.2 but for the moment you will have to extend Panel rather than JPanel and all should be ok - this should make no difference to the operation of the Bean.
Another option would be to write a BeanInfo class for your Bean and prevent the exposure of the problem property (inputMap) that way. -
i am trying to use an "normal" applet (myapplet) designed for use in a html-page
in forms9i.
properties in applet can be set as "<param name="image1" value="1.jpg">...
i used jdevloper to create a wrapper-bean:
new->beans->Oracle Forms Pluggable Java Component
extends: oracle.jdeveloper.pjc.BeanWrapper
optional attributes: bean: myapplet.
then i tried to define the property ids like:
private final static ID image1 = ID.registerProperty("image1");
what next? any howto's??? the pjc-demo from otn does not exactly describe, how to make a wrapper bean...
kind regardsClose - but you don't need the .class extension.
1) Copy the Clock.class into your forms90/java directory (or you can have it in a JAR and point to in the various Archive Tags - but let's just copy the class for the moment)
Then the code you need in your When-New-Form-Instance is something like:
FBEAN.REGISTER_BEAN ('BLOCK1.CLOCKAREA',1,'Clock');
That should create the clock in the bean area (I've just tried the Java 1.4 Clock and it works)
The calls to FBean.SET_PROPERTY() are not going to be the way to set applet properties on the Clock. FBean.set_property is for setting the values of public variables on the bean (if it has any and this one does not).
Setting the Applet properties is done like the forms applet properties themselves. So you need to update the template HTML file - in this case basejini.htm and add in the properties that this Applet uses to the ones the Forms Applet uses -
e.g. I added <PARAM NAME="bgcolor" value="FF0000"> to my basejini to set the background of the clock to Red.
The only thing you won't be able to change in this way is the Width and height. The size of the Bean Area effectively becomes the Applet Area in that case. -
Problem in CLIENT_OLE2.SET_PROPERTY usage
Hi,
I am trying to call this procedure with a need to pass value of CLIENT_OLE2.OBJ_TYPE type. I did it this way:
ARG_LIST := CLIENT_OLE2.CREATE_ARGLIST;
CLIENT_OLE2.ADD_ARG_OBJ(ARG_LIST,variable of OBJ_TYPE type);
CLIENT_OLE2.SET_PROPERTY(obj,'property name','1',ARG_LIST);
CLIENT_OLE2.DESTROY_ARGLIST(ARG_LIST);
Unfortunately, this give me error.
I think the problem is in the third parameter in SET_PROPERTY call.
What that correct value for this parameter?
Notice that WebUtil is correctly installed and well working.
If any one has solution for this problem, please help me.
ThanksYou can modify webutil.pll (make a backup, of course). Have a look at the client_ole2.set_property procedure and change the line
v_str varchar2(4000 char);
into whatever you want, e.g.
v_str varchar2(32767);
Compile and save webutil.pll, then try again.
Gerald -
Problem with entity- set_property. Does not set the value on Save
There is a custom field enhanced in BP_HEAD component in node header structure.
Code to set the property is written in do_prepare_output method. This value gets set with X after BACK from contact details.
I see the value X before Save of the account details. After Save, the set_property does not work and so the value is not displayed.
Please help to explain what could be the reason and how to rectify it.
Note: Before Save, If I select Edit I see the value on the field. If I select Save after the Edit. The value is retained.
This issue occurs only when new account details is Saved.Hi ,
The set_property( ) does not work if the field is non-editable. You have to make sure that you do this operation only for fields which are editable.
Also if you done a set_property( ), make you perform a modify also and there should be a save followed by a commit ( framework does it for you or you do it manually).
* 1. Lock an entity and modify a property
* here booking entity with technical name u2018UIFBokkingu2019
2 Basic Features of the BOL Application Programming Interface
<January 2009> 19
lv_booking = lv_flight->get_related_entity(
u2018FlightBookingRelu2019 ).
IF lv_booking->lock( ) = ABAP_TRUE.
lv_booking->set_property( iv_attr_name = u2018SMOKERu2019
iv_value = u2018Xu2019 ).
ENDIF.
* 2. send all changes to BO layer
lv_bol_core->modify( ).
* 3. get the implicitly created global transaction
DATA: lv_transaction TYPE REF TO if_bol_transaction_context.
lv_transaction = lv_bol_core->get_transaction( ).
* 4. save and commit your changes
lv_transaction->save( ).
lv_transaction->commit( ).
Regards
Kavindra -
Problem with authentication using UTL_DBWS
Hi,
I'm trying to call out to a web service from a PL/SQL procedure using UTL_DBWS. I am getting the following error when executing the procedure:
ORA-29532: Java call terminated by uncaught Java exception: javax.xml.rpc.soap.SOAPFaultException: ARERR [149] A user name must be supplied in the control record
This is despite the fact that I have set the USERNAME property using utl_dbws.set_property. I am 99% sure that the problem is within my Oracle call, becuase I have used a web services utility (SoapSonar) to successfully call the web service, and I have also been able to recreate the error message using the same utility by removing the username information from the xml message header. I have also been able to successfully call the web service if I allow anonymous use of the web service (unfortuantely I need to use the security/authentication for this project).
I have used utl_dbws.get_property to verify that the USERNAME property is being set correctly, but it still seems that the username is not being included in the header when I call the web service with UTL_DBWS.invoke.
Does anyone have any suggestions?
Thanks,
JasonHi,
I'm having the same issue using UTL_DBWS. Calls to services that don't require authentication seem to work well using this package but I can't get the basic authentication calls working. When I examine the HTTP header it missing the "Authorization: Basic <base64-encoded-string>" line that I'd expect to see.
I'm using the utl_dbws.set_property procedure to set the USERNAME and PASSWORD properties.
Anyone have any ideas how to overcome this problem?
Cheers,
Anand. -
Cant get FBEAN.GET_CHAR_PROPERTY to return more than one character
I have a javabean on my form. I am passing values to the bean using FBEAN_INVOKE. I need to get error messages back from Java. I set the logging mode to Log_All.
I use FBEAN.GET_CHAR_PROPERTY to return an error.
Here's my code:
retval varchar2(10);
retval := FBEAN.GET_CHAR_PROPERTY('bean',1,'errorMessage');
message (retval);
The message appears on the Java control panel. But the message returned in the Form is null, unless the value is one char length. It should be able to return a string.
I have a similar problem when using FBEAN_INVOKE_CHAR.
My Java class extends JPanel
Does anyone know what is wrong ?I dont know how but this issue resolved itself
-
hi everyone... i am having a problem with ole in oracle forms 6i. i have created to fields blob in a table, and i have also created ole for these 2 fields (word.application). but my am having some weird results.
1. when i insert a word doc from application to one of these fields and then insert the other word application to the other ole these doc change their places, or one of these docs is deleted.. and things like this...can anyone pls help meok i have found a code in the forum:
DECLARE
app OLE2.OBJ_TYPE;
docs OLE2.OBJ_TYPE;
doc OLE2.OBJ_TYPE;
selection OLE2.OBJ_TYPE;
args OLE2.LIST_TYPE;
BEGIN
-- create a new document
app := OLE2.CREATE_OBJ('Word.Application');
OLE2.SET_PROPERTY(app,'Visible',1);
docs := OLE2.GET_OBJ_PROPERTY(app, 'Documents');
doc := OLE2.INVOKE_OBJ(docs, 'add');
selection := OLE2.GET_OBJ_PROPERTY(app, 'Selection');
-- insert data into new document from long item
OLE2.SET_PROPERTY(selection, 'Text', :long_item);
-- save document as example.doc
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 'c:\temp\example.doc');
OLE2.INVOKE(doc, 'SaveAs', args);
OLE2.DESTROY_ARGLIST(args);
-- close example.doc
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 0);
OLE2.INVOKE(doc, 'Close', args);
OLE2.DESTROY_ARGLIST(args);
OLE2.RELEASE_OBJ(selection);
OLE2.RELEASE_OBJ(doc);
OLE2.RELEASE_OBJ(docs);
-- exit MSWord
OLE2.INVOKE(app,'Quit');
END;
my QUESTION is this: as i am new in oracle, is this code for oracle forms6 and does this one solve my problem? pls try to give me an answer, i really need to fix it :( thanks to every one :)
Message was edited by:
user537329 -
Problem while transfering data from form to excel
Hi all.
I have a little problem. I have a procedure that fires on when-button-pressed trigger that goes to current block and download the data into an excel file.
The block has 2200 records.
The problem is that if I make the application visible all is ok; if I make the application not visible it remains "append" and nothing happens.
I'm on developer suite 10g.
Here is the code:
PROCEDURE pr_Forms_to_Excel(p_block_name IN VARCHAR2 DEFAULT NAME_IN('system.current_block')) IS
-- Declare the OLE objects
application OLE2.OBJ_TYPE;
workbooks OLE2.OBJ_TYPE;
workbook OLE2.OBJ_TYPE;
worksheets OLE2.OBJ_TYPE;
worksheet OLE2.OBJ_TYPE;
cell OLE2.OBJ_TYPE;
range OLE2.OBJ_TYPE;
range_col OLE2.OBJ_TYPE;
-- Declare handles to OLE argument lists
args OLE2.LIST_TYPE;
-- Declare form and block items
form_name VARCHAR2(100);
f_block VARCHAR2(100);
l_block VARCHAR2(100);
f_item VARCHAR2(100);
l_item VARCHAR2(100);
cur_block VARCHAR2(100) := NAME_IN('system.current_block');
cur_item VARCHAR2(100) := NAME_IN('system.current_item');
cur_record VARCHAR2(100) := NAME_IN('system.cursor_record');
item_name VARCHAR2(100);
baslik VARCHAR2(100);
row_n NUMBER;
col_n NUMBER;
filename VARCHAR2(100);
BEGIN
-- Start Excel
application:=OLE2.CREATE_OBJ('Excel.Application');
OLE2.SET_PROPERTY(application, 'Visible', 'TRUE');
-- Return object handle to the Workbooks collection
workbooks:=OLE2.GET_OBJ_PROPERTY(application, 'Workbooks');
-- Add a new Workbook object to the Workbooks collection
workbook:=OLE2.GET_OBJ_PROPERTY(workbooks,'Add');
-- Return object handle to the Worksheets collection for the Workbook
worksheets:=OLE2.GET_OBJ_PROPERTY(workbook, 'Worksheets');
-- Get the first Worksheet in the Worksheets collection
-- worksheet:=OLE2.GET_OBJ_PROPERTY(worksheets,'Add');
args:=OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 1);
worksheet:=OLE2.GET_OBJ_PROPERTY(worksheets,'Item',args);
OLE2.DESTROY_ARGLIST(args);
-- Return object handle to cell A1 on the new Worksheet
go_block(p_block_name);
baslik := get_block_property(p_block_name,FIRST_ITEM);
f_item := p_block_name||'.'||get_block_property(p_block_name,FIRST_ITEM);
l_item := p_block_name||'.'||get_block_property(p_block_name,LAST_ITEM);
first_record;
LOOP
item_name := f_item;
row_n := NAME_IN('SYSTEM.CURSOR_RECORD');
col_n := 1;
LOOP
IF get_item_property(item_name,ITEM_TYPE)<>'BUTTON' AND
get_item_property(item_name,VISIBLE)='TRUE'
THEN
-- Set first row with the item names
IF row_n=1 THEN
baslik:=NVL(get_item_property(item_name,PROMPT_TEXT),baslik);
args:=OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, row_n);
OLE2.ADD_ARG(args, col_n);
cell:=OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
OLE2.DESTROY_ARGLIST(args);
OLE2.SET_PROPERTY(cell, 'Value', baslik);
OLE2.RELEASE_OBJ(cell);
END IF;
-- Set other rows with the item values
args:=OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, row_n+1);
OLE2.ADD_ARG(args, col_n);
cell:=OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
OLE2.DESTROY_ARGLIST(args);
IF get_item_property(item_name,DATATYPE)<>'NUMBER' THEN
OLE2.SET_PROPERTY(cell, 'NumberFormat', '@');
END IF;
OLE2.SET_PROPERTY(cell, 'Value', name_in(item_name));
OLE2.RELEASE_OBJ(cell);
END IF;
IF item_name = l_item THEN
exit;
END IF;
baslik := get_item_property(item_name,NEXTITEM);
item_name := p_block_name||'.'||get_item_property(item_name,NEXTITEM);
col_n := col_n + 1;
END LOOP;
EXIT WHEN NAME_IN('system.last_record') = 'TRUE';
NEXT_RECORD;
END LOOP;
-- Autofit columns
range := OLE2.GET_OBJ_PROPERTY( worksheet,'UsedRange');
range_col := OLE2.GET_OBJ_PROPERTY( range,'Columns');
OLE2.INVOKE( range_col,'AutoFit' );
OLE2.RELEASE_OBJ( range );
OLE2.RELEASE_OBJ( range_col );
-- Get filename and path
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG( args, p_block_name );
OLE2.ADD_ARG( args,'Excel Workbooks (*.xls, *.xls');
filename := OLE2.INVOKE_CHAR( application,'GetSaveAsFilename',args );
OLE2.DESTROY_ARGLIST( args );
-- Save as worksheet
IF NVL(filename,'0')<>'0' THEN
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG( args,filename );
OLE2.INVOKE( worksheet,'SaveAs',args );
OLE2.DESTROY_ARGLIST( args );
END IF;
-- Close workbook
OLE2.INVOKE( workbook ,'Close');
-- Release the OLE objects
OLE2.RELEASE_OBJ(worksheet);
OLE2.RELEASE_OBJ(worksheets);
OLE2.RELEASE_OBJ(workbook);
OLE2.RELEASE_OBJ(workbooks);
OLE2.INVOKE(application, 'Quit');
OLE2.RELEASE_OBJ(application);
-- Focus to the original location
go_block(cur_block);
go_record(cur_record);
go_item(cur_block||'.'||cur_item);
END;
Is there anyone that can help me????
Thanks,
FabrizioHi all.
I have a little problem. I have a procedure that fires on when-button-pressed trigger that goes to current block and download the data into an excel file.
The block has 2200 records.
The problem is that if I make the application visible all is ok; if I make the application not visible it remains "append" and nothing happens.
I'm on developer suite 10g.
Here is the code:
PROCEDURE pr_Forms_to_Excel(p_block_name IN VARCHAR2 DEFAULT NAME_IN('system.current_block')) IS
-- Declare the OLE objects
application OLE2.OBJ_TYPE;
workbooks OLE2.OBJ_TYPE;
workbook OLE2.OBJ_TYPE;
worksheets OLE2.OBJ_TYPE;
worksheet OLE2.OBJ_TYPE;
cell OLE2.OBJ_TYPE;
range OLE2.OBJ_TYPE;
range_col OLE2.OBJ_TYPE;
-- Declare handles to OLE argument lists
args OLE2.LIST_TYPE;
-- Declare form and block items
form_name VARCHAR2(100);
f_block VARCHAR2(100);
l_block VARCHAR2(100);
f_item VARCHAR2(100);
l_item VARCHAR2(100);
cur_block VARCHAR2(100) := NAME_IN('system.current_block');
cur_item VARCHAR2(100) := NAME_IN('system.current_item');
cur_record VARCHAR2(100) := NAME_IN('system.cursor_record');
item_name VARCHAR2(100);
baslik VARCHAR2(100);
row_n NUMBER;
col_n NUMBER;
filename VARCHAR2(100);
BEGIN
-- Start Excel
application:=OLE2.CREATE_OBJ('Excel.Application');
OLE2.SET_PROPERTY(application, 'Visible', 'TRUE');
-- Return object handle to the Workbooks collection
workbooks:=OLE2.GET_OBJ_PROPERTY(application, 'Workbooks');
-- Add a new Workbook object to the Workbooks collection
workbook:=OLE2.GET_OBJ_PROPERTY(workbooks,'Add');
-- Return object handle to the Worksheets collection for the Workbook
worksheets:=OLE2.GET_OBJ_PROPERTY(workbook, 'Worksheets');
-- Get the first Worksheet in the Worksheets collection
-- worksheet:=OLE2.GET_OBJ_PROPERTY(worksheets,'Add');
args:=OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 1);
worksheet:=OLE2.GET_OBJ_PROPERTY(worksheets,'Item',args);
OLE2.DESTROY_ARGLIST(args);
-- Return object handle to cell A1 on the new Worksheet
go_block(p_block_name);
baslik := get_block_property(p_block_name,FIRST_ITEM);
f_item := p_block_name||'.'||get_block_property(p_block_name,FIRST_ITEM);
l_item := p_block_name||'.'||get_block_property(p_block_name,LAST_ITEM);
first_record;
LOOP
item_name := f_item;
row_n := NAME_IN('SYSTEM.CURSOR_RECORD');
col_n := 1;
LOOP
IF get_item_property(item_name,ITEM_TYPE)<>'BUTTON' AND
get_item_property(item_name,VISIBLE)='TRUE'
THEN
-- Set first row with the item names
IF row_n=1 THEN
baslik:=NVL(get_item_property(item_name,PROMPT_TEXT),baslik);
args:=OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, row_n);
OLE2.ADD_ARG(args, col_n);
cell:=OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
OLE2.DESTROY_ARGLIST(args);
OLE2.SET_PROPERTY(cell, 'Value', baslik);
OLE2.RELEASE_OBJ(cell);
END IF;
-- Set other rows with the item values
args:=OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, row_n+1);
OLE2.ADD_ARG(args, col_n);
cell:=OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
OLE2.DESTROY_ARGLIST(args);
IF get_item_property(item_name,DATATYPE)<>'NUMBER' THEN
OLE2.SET_PROPERTY(cell, 'NumberFormat', '@');
END IF;
OLE2.SET_PROPERTY(cell, 'Value', name_in(item_name));
OLE2.RELEASE_OBJ(cell);
END IF;
IF item_name = l_item THEN
exit;
END IF;
baslik := get_item_property(item_name,NEXTITEM);
item_name := p_block_name||'.'||get_item_property(item_name,NEXTITEM);
col_n := col_n + 1;
END LOOP;
EXIT WHEN NAME_IN('system.last_record') = 'TRUE';
NEXT_RECORD;
END LOOP;
-- Autofit columns
range := OLE2.GET_OBJ_PROPERTY( worksheet,'UsedRange');
range_col := OLE2.GET_OBJ_PROPERTY( range,'Columns');
OLE2.INVOKE( range_col,'AutoFit' );
OLE2.RELEASE_OBJ( range );
OLE2.RELEASE_OBJ( range_col );
-- Get filename and path
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG( args, p_block_name );
OLE2.ADD_ARG( args,'Excel Workbooks (*.xls, *.xls');
filename := OLE2.INVOKE_CHAR( application,'GetSaveAsFilename',args );
OLE2.DESTROY_ARGLIST( args );
-- Save as worksheet
IF NVL(filename,'0')<>'0' THEN
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG( args,filename );
OLE2.INVOKE( worksheet,'SaveAs',args );
OLE2.DESTROY_ARGLIST( args );
END IF;
-- Close workbook
OLE2.INVOKE( workbook ,'Close');
-- Release the OLE objects
OLE2.RELEASE_OBJ(worksheet);
OLE2.RELEASE_OBJ(worksheets);
OLE2.RELEASE_OBJ(workbook);
OLE2.RELEASE_OBJ(workbooks);
OLE2.INVOKE(application, 'Quit');
OLE2.RELEASE_OBJ(application);
-- Focus to the original location
go_block(cur_block);
go_record(cur_record);
go_item(cur_block||'.'||cur_item);
END;
Is there anyone that can help me????
Thanks,
Fabrizio -
Hi all,
I'm using oracle 6i and in my program I use an activeX for generating barcodes..
the activeX genrate an image file and i need to store it in db(oracle 9i) or at least show the generated image through my form...the problem I encounter is that the read_image_file built in does not read the barcode images while it reads and shows other pictures with the same type (ex. tif or jpg)...
here is my code (in case if it is useful) :
declare
application ole2.obj_type;
begin
application := ole2.create_obj('IDAuto.BarCode.1');
----DataToEncode :this is the data that is to be encoded in the barcode
ole2.set_property(application,'DataToEncode',:txt);
IDAuto_IBarCode.SetPixelsXY(application,2048,1024);
----this method save the image file
IDAuto_IBarCode.SaveEnhWMF(application,'d:\TEST.tif');
:system.message_level := '25';
Read_Image_File(,'d:\TEST.tif','TIFF', 'control.itm_image');
:system.message_level := '0';
end;The errors are here:
byte buff[]=new byte[(int)file.length()];
InputStream fileIn=new FileInputStream(aa);
int i=fileIn.read(buff);
String conffile=new String(buff); (conffile is a String object containing the image)
and here:
String content ="-----------------------------7d11e410e500f2\r\n"+"Con
ent-Disposition: form-data;"+"name=\"upload\";
filename=\""+aa+"\"\r\n"+"Content-Type:
application/octet-strem\r\n\r\n\r\n"+conffile+"--------
--------------------7d11e410e500f2--\r\n";
printout.writeBytes(content);conffie is sent to the server but
it's non possible to treat binary data as String!
Image files must be sent as byte[] NOT as String ...... -
Problem communication with Web Service
Hello,
today i've got a really illogical error. I will try to explain:
I have got a procedure, which connect with a web service.
The Code of this function is:
°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
create or replace procedure opc.P_WCF_WEBSERVICE(pEmpfaenger in varchar2, pData in varchar2) is
service_ sys.utl_dbws.SERVICE;
call_ sys.utl_dbws.CALL;
service_qname sys.utl_dbws.QNAME;
response sys.XMLTYPE; request
sys.XMLTYPE;
begin
service_qname := sys.utl_dbws.to_qname(null, 'WebService_WCF');
service_ := sys.utl_dbws.create_service(service_qname);
call_ := sys.utl_dbws.create_call(service_);
sys.utl_dbws.set_target_endpoint_address(call_, 'http://server:84/Service.asmx');
sys.utl_dbws.set_property( call_, 'SOAPACTION_USE', 'TRUE');
sys.utl_dbws.set_property( call_, 'SOAPACTION_URI', 'http://tempuri.org/SendXMLTOApplication');
request := sys.XMLTYPE('<SendXMLTOApplication xmlns="http://tempuri.org/"><pEmpfaenger>' ||
pEmpfaenger ||'</pEmpfaenger><pXML>' || pData ||'</pXML></SendXMLTOApplication>');
response :=sys. utl_dbws.invoke(call_, request);
--return response.extract('//child::text()', 'xmlns="http://gefdnb048a:4800/WebService-WCF/Service.asmx"').getstringval();
end P_WCF_WEBSERVICE;
OK, if i want use this procedure, I use the following command:
°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
begin
OPC.P_WCF_WEBSERVICE('OPC',
'&<MaschineSperren DLL="MaschineSperren.dll" MC="TBM02" Barcode="14154360" /&> '
end;
The WebService got the correct XML-String (<MaschineSperren DLL="MaschineSperren.dll" MC="TBM02" Barcode="14154360" /> )
if I use the same command in a Trigger (after insert), I've got the following error message in line ( request := sys.XMLTYPE('<S... ) :
ORA-31011: XML parsing
ORA19202: Error occured in XML processing
LPX-00242 invalid use of amersand(") character(use amp;)
I thought, I should replace the & with &
If i use it in that way, my WebService got the follwing xml-string:
&<MaschineSperren DLL="MaschineSperren.dll" MC="TBM01" Barcode="14154360" /&>
But i need a XML string!
"&<" will not replaced to "<", if I do it in that way.
The Problem occures only in a Trigger!!!
What should I do - What can be wrong?
I hope, Someone can help me.
Thanks AndiHi,
I am working on a similar scenario where I my consuming an external web service using https protocol from PI.
I have configured a soap receiver channel to call the target url of this web service as https://portal.xyz.org.uk/webservice_alt.
I am getting an error HTTP 302 suggesting that PI is not able to follow the re-direction to the target URL as the service resides not on that URL but on https://portal1.xyz.org.uk/webservice_alt or https://portal2.xyz.org.uk/webservice_alt.
This is their server fail over handling mechanism which is very common. But PI 7.0 is not able to handle this.
So if I change the target URL on the SOAP receiver channel to https://portal1.xyz.org.uk/web service or https://portal2.xyz.org.uk/webservice_alt , PI works fine without errors . But this is not the right approach because, every time the web service provider takes one of these systems down for upgrade/patching etc, they inform us and then I manually go and change the target URL to the available server on my production PI system config.
My problem is I want to resolve this redirection error in PI. I have tried raising a call with SAP itself and they pointed out to use Axis adapter which is still not working.
So I am here asking for help. any suggestions please from the experts?
Thanks
Jhansi. -
Fbean doesn't work anymore after forms patch 10.1.2.2.0
Hi everybody!
I was working with Forms 10.1.2.0.2, Oracle AS 10g release 2 (10.1.2.0.2) and I
was using Internet Explorer 6.
There was a limitation with IE 6, so I choosed to migrate to Internet Explorer 7.
Now I have Internet Explorer 7, Oracle AS 10.1.2.2.0, Forms 10.1.2.2.0.
I recompiled all the frames and libraries.
All the frames containing a java bean reached the FRM-92101 error. I had to destroy and
recreate each javabean.
Now the frames reach the same error when calling Fbean package.
Do I have to recompile this package or something like that?
How can I do?
Has anybody got an idea?
Thanks for your help.
ChristineHi Ramesh,
I applied latest patch 6673231 (MLR#11, 11-FEB-2008) but the issue persists. On metalink I found SR 18299248.6 and Note:469848.1 on this exact problem.
However the patch has been removed from the temporary ftp location given in the SR, and its not in the latest merge patch so I can't get my hands on it.
Could you please get me this patch, or do you recommend me to open a new SR just to get to download this patch? Many thanks!
with kind regards,
Gerben
Maybe you are looking for
-
Best practices of having a different external/internal domain
In the midst of migrating from a joint Windows/Mac server environment to a completely Apple one. Previously, DNS was hosted on the Windows machine using the companyname.local internal domain. When we set up the Apple server, our Apple contact created
-
I'm using iPod 4th Gen iOS 6.1.3 and an iMac with 11.3 .. All latest versions. I have 23.4gb music according to the file but when I attached the iPod the bar at the foot of the page says 18.3gb. Some tracks are missing. Most if not all have been ripp
-
Encoding Time Compared to iMovie 4
we have an older mac we just use for encoding and exporting video files - why is it that iMovie HD6 is so much slower in encoding and exporting an iMovie clip as a QUICKTIME>CD-ROM file - than iMovie 4? It's not even close, it might take up to 3 time
-
Hello, My problem is that i'd like when i post through PodcastCapture to generate multiple entries so each formats will have an entry in iTunes ? I thought at first that duplicating the groupblog task will be enough, but in fact it seems necessary to
-
Hi, Is there any condition type where I can enter manual CST/VAT in MM pricing procedure and the same value will be passed to TAX procedure. The same way JEXC will function for basic excise duty. Is there any routine or user exit to pass manual value