Using ActiveX in Oracle Forms6i

Sir I have development an ActiveX in VB for urdu in oracle forms.
The problems I am facing is that it is storing the input efficiently but
when I Query the saved data it is not working,
I got an Error that OLE Object not defined for the current record.
It create the OLE object for a new record and take input & save it
But as I assign the retrieved Data in Post Query, it give error object not
defined.
At the same time it display out when assign with when button pressed.
the code that is working is for saving in the database is at save button (when
button pressed)
DECLARE
VEN_IDp OLE2.OBJ_TYPE;
VEN_NAMEp OLE2.OBJ_TYPE;
ADD1p OLE2.OBJ_TYPE;
CITYp OLE2.OBJ_TYPE;
ZIPCODEp OLE2.OBJ_TYPE;
STATEp OLE2.OBJ_TYPE;
COUNTRYp OLE2.OBJ_TYPE;
PHONE1p OLE2.OBJ_TYPE;
PHONE2p OLE2.OBJ_TYPE;
MOBILEp OLE2.OBJ_TYPE;
FAXp OLE2.OBJ_TYPE;
ECOMMENTSp OLE2.OBJ_TYPE;
n1 NUMBER;
V1 VARCHAR2(255);
V2 VARCHAR2(255);
V3 VARCHAR2(255);
V4 VARCHAR2(255);
V5 VARCHAR2(255);
V6 VARCHAR2(255);
V7 VARCHAR2(255);
V8 VARCHAR2(255);
V9 VARCHAR2(255);
V10 VARCHAR2(255);
V11 VARCHAR2(255);
V12 VARCHAR2(255);
BEGIN
--creating pointers to the activeX's
VEN_IDp := FORMS_OLE.GET_INTERFACE_POINTER('VEN_IDU');
VEN_NAMEp := FORMS_OLE.GET_INTERFACE_POINTER('VEN_NAMEU');
ADD1p := FORMS_OLE.GET_INTERFACE_POINTER('ADD1U');
CITYp := FORMS_OLE.GET_INTERFACE_POINTER('CITYU');
ZIPCODEp := FORMS_OLE.GET_INTERFACE_POINTER('ZIPCODEU');
STATEp := FORMS_OLE.GET_INTERFACE_POINTER('STATEU');
COUNTRYp := FORMS_OLE.GET_INTERFACE_POINTER('COUNTRYU');
PHONE1p := FORMS_OLE.GET_INTERFACE_POINTER('PHONE1U');
PHONE2p := FORMS_OLE.GET_INTERFACE_POINTER('PHONE2U');
MOBILEp := FORMS_OLE.GET_INTERFACE_POINTER('MOBILEU');
FAXp := FORMS_OLE.GET_INTERFACE_POINTER('FAXU');
ECOMMENTSp := FORMS_OLE.GET_INTERFACE_POINTER('ECOMMENTSU');
--getting new value returned by the ActiveX
N1 :=Project1_UserControl1.getUrduText(VEN_IDp);
V2 :=Project1_UserControl1.getUrduText(VEN_NAMEp);
V3 :=Project1_UserControl1.getUrduText(ADD1p);
V4 :=Project1_UserControl1.getUrduText(CITYp);
V5 :=Project1_UserControl1.getUrduText(ZIPCODEp);
V6 :=Project1_UserControl1.getUrduText(STATEp);
V7 :=Project1_UserControl1.getUrduText(COUNTRYp);
V8 :=Project1_UserControl1.getUrduText(PHONE1p);
V9 :=Project1_UserControl1.getUrduText(PHONE2p);
V10 :=Project1_UserControl1.getUrduText(MOBILEp);
V11 :=Project1_UserControl1.getUrduText(FAXp);
V12 :=Project1_UserControl1.getUrduText(ECOMMENTSp);
assigning the value to database item for saving
:VEN_ID := N1;
:VEN_NAME :=V2;
:ADD1 := V3;
:CITY :=V4;
:ZIPCODE :=V5;
:STATE :=V6;
:COUNTRY:=V7;
:PHONE1 :=V8;
:PHONE2 :=V9;
:MOBILE :=V10;
:FAX :=V11;
:ECOMMENTS :=V12;
END;
-- It save the record successfully
and the code not working at (post query OR timer expired created at post query)
It query the data from database and display it in the textitem but I want to
assign it to ActiveX for Urdu Display
(the activeX display Urdu for assiged value in button pressed case)
DECLARE
VEN_IDp OLE2.OBJ_TYPE;
VEN_NAMEp OLE2.OBJ_TYPE;
ADD1p OLE2.OBJ_TYPE;
CITYp OLE2.OBJ_TYPE;
ZIPCODEp OLE2.OBJ_TYPE;
STATEp OLE2.OBJ_TYPE;
COUNTRYp OLE2.OBJ_TYPE;
PHONE1p OLE2.OBJ_TYPE;
PHONE2p OLE2.OBJ_TYPE;
MOBILEp OLE2.OBJ_TYPE;
FAXp OLE2.OBJ_TYPE;
ECOMMENTSp OLE2.OBJ_TYPE;
V1 VARCHAR2(255);
V2 VARCHAR2(255);
V3 VARCHAR2(255);
V4 VARCHAR2(255);
V5 VARCHAR2(255);
V6 VARCHAR2(255);
V7 VARCHAR2(255);
V8 VARCHAR2(255);
V9 VARCHAR2(255);
V10 VARCHAR2(255);
V11 VARCHAR2(255);
V12 VARCHAR2(255);
str1 VARCHAR2(255);
str2 VARCHAR2(255);
str3 VARCHAR2(255);
str4 VARCHAR2(255);
str5 VARCHAR2(255);
str6 VARCHAR2(255);
str7 VARCHAR2(255);
str8 VARCHAR2(255);
str9 VARCHAR2(255);
str10 VARCHAR2(255);
str11 VARCHAR2(255);
str12 VARCHAR2(255);
BEGIN
SYNCHRONIZE;
VEN_IDp := FORMS_OLE.GET_INTERFACE_POINTER('VEN_IDU');
VEN_NAMEp := FORMS_OLE.GET_INTERFACE_POINTER('VEN_NAMEU');
ADD1p := FORMS_OLE.GET_INTERFACE_POINTER('ADD1U');
CITYp := FORMS_OLE.GET_INTERFACE_POINTER('CITYU');
ZIPCODEp := FORMS_OLE.GET_INTERFACE_POINTER('ZIPCODEU');
STATEp := FORMS_OLE.GET_INTERFACE_POINTER('STATEU');
COUNTRYp := FORMS_OLE.GET_INTERFACE_POINTER('COUNTRYU');
PHONE1p := FORMS_OLE.GET_INTERFACE_POINTER('PHONE1U');
PHONE2p := FORMS_OLE.GET_INTERFACE_POINTER('PHONE2U');
MOBILEp := FORMS_OLE.GET_INTERFACE_POINTER('MOBILEU');
FAXp := FORMS_OLE.GET_INTERFACE_POINTER('FAXU');
ECOMMENTSp := FORMS_OLE.GET_INTERFACE_POINTER('ECOMMENTSU');
--function setUrduText(interface oleobj,text in out varchar2) Return varchar2
This function Displays Urdu when value is assigned in when button pressed event
str1 :=Project1_UserControl1.setUrduText(VEN_IDp,:VENDOR.VEN_ID);
str2 :=Project1_UserControl1.setUrduText(VEN_NAMEp,:VENDOR.VEN_NAME);
str3 :=Project1_UserControl1.setUrduText(ADD1p,:VENDOR.ADD1);
str4 :=Project1_UserControl1.setUrduText(CITYp,:VENDOR.CITY);
str5 :=Project1_UserControl1.setUrduText(ZIPCODEp,:VENDOR.ZIPCODE);
str6 :=Project1_UserControl1.setUrduText(STATEp,:VENDOR.STATE);
str7 :=Project1_UserControl1.setUrduText(COUNTRYp,:VENDOR.COUNTRY);
str8 :=Project1_UserControl1.setUrduText(PHONE1p,:VENDOR.PHONE1);
str9 :=Project1_UserControl1.setUrduText(PHONE2p,:VENDOR.PHONE2);
str10 :=Project1_UserControl1.setUrduText(MOBILEp,:VENDOR.MOBILE);
str11 :=Project1_UserControl1.setUrduText(FAXp,:VENDOR.FAX);
str12 :=Project1_UserControl1.setUrduText
END;
I am not getting the point that why the Error OLE object not defined occur in
display case where as in new record the object is activited on new record
instane by itself but not in post query
I am working on application of a library with Urdu data and at last step Iam
facing the problem above PLs guide me
Thanks in advance
null

Ignore my previous post. I misread the question.
There is no support for using ActiveX in JDeveloper. What you would need to do is to wrap your activex in a Java class and then you'd be able to use that java class in your project. There may be some facilities available somewhere on the internet that would help you doing that. I just don't know of any.
Regards,
Michel

Similar Messages

  • Error while using row_num function in forms6i

    Oracle forms6i
    Hai
    While using row num function in my forms i had a error.
    My coding is
    declare
    pin_no varchar2(16);
    pin_date date;
    pin_time varchar2(25);
    mstr varchar2(200);
    m_file TEXT_IO.FILE_TYPE;
    m_file_path varchar2(100) := :global.filename;
    line_count number;
    M_BARCODE VARCHAR2(16);
    M_BARDATE DATE;
    M_BARTIME varchar2(25);
    M_No number;
    Cursor c1 is
    select barcode,bardate,bartime,
    row_number() over (partition barcode order by bartime) as RN-------------------the error at this line
    from temp_attendance
    group by barcode,bardate,bartime
    order by bardate;
    begin
    If m_file_path is not null then
    m_file:= TEXT_IO.fopen(m_file_path, 'r');
    --DELETE FROM temp_attendance;     
    Loop
    begin
    TEXT_IO.get_line(m_file,mstr);
    mstr := ltrim(rtrim(mstr));
    M_barcode :=substr(mstr,1,16);
    M_bardate := to_date(substr(mstr,17,8),'DD/MM/YYYY');
    M_bartime := (substr(mstr,25,4));
    INSERT INTO temp_attendance(BARCODE,BARDATE,BARTIME,RN) VALUES(M_BARCODE,M_BARDATE,M_BARTIME,M_No);
    Exception
    when no_data_found then
    text_io.fclose(m_file);
    exit;
    End;
    End loop;
    go_block('TEST_MS1');
    clear_block(no_validate);
    For r1 in c1 loop
         :barcode := r1.barcode;
         :bardate := r1.bardate;
         :bartime := r1.bartime;
         next_Record;
    end loop;
    first_record;
    end if;
    exception
    when others then
    forms_ddl('ROLLBACK');
    message (sqlerrm);
    end;
    Thanks & Regards
    Srikkanth.M

    Hi,
    Try using:
    row_number() over (partition BY barcode order by bartime) as RN
    If that wasn't the problem, what is the error you are getting?
    Regards.

  • Query about use activex control in Developer form

    I'm an oracle developer and My name is milton datta.I cant' use activex control in forms.Pls. anybody would help me how to use activex control in developer forms.If possible provide me with some examples.
    my email address is [email protected]

    Download the Oracle Forms demos and you'll see a sample.
    Also read the documentation for Oracle Forms 6i the developer guide has a section about Active/X.
    Just remember that they will not work once you take your Forms to the Web. So think twice before you use them.

  • Oracle Forms6i Query Performance issue - Urgent

    Hi All,
    I'm using oracle forms6i and Oracle DB 9i.
    I'm facing the performance issue in query forms.
    In detail block form taking long time to load the data.
    Form contains 2 non data blocks
    1.HDR - 3 input parameters
    2.DETAILS - Grid - Details
    HDR input fields
    1.Company Code
    2.Company ACccount No
    3.Customer Name
    Details Grid is displayed the details.
    Here there are 2 tables involved
    1.Table1 - 1 crore records
    2.Table2 - 4 crore records
    In form procedure one cursor bulid and fetch is done directly and assign the values to form block fields.
    Below i've pasted the query
    SELECT
    t1.entry_dt,
    t2.authoriser_code,
    t1.company_code,
    t1.company_ac_no
    initcap(t1.customer_name) cust_name,
    t2.agreement_no
    t1.customer_id
    FROM
    table1 t1,
    table2 t2
    WHERE
    (t2.trans_no = t1.trans_no or t2.temp_trans_no = t1.trans_no)
    AND t1.company_code = nvl(:hdr.l_company_code,t1.company_code)
    AND t1.company_ac_no = nvl(:hdr.l_company_ac_no,t1.company_ac_no)
    AND lower(t1.customer_name) LIKE lower(nvl('%'||:hdr.l_customer_name||'%' ,t1.customer_name))
    GROUP BY
    t2.authoriser_code,
    t1.company_code,
    t1.company_ac_no,
    t1.customer_name,
    t2.agreement_no,
    t1.customer_id;
    Where Clause Analysis
    1.Condition 1 OR operator (In table2 two different columbs are compared with one column in table)
    2.Like Operator
    3.All the columns has index but not used properly always full table scan
    4.NVL chk
    5.If i run the qry in backend means coming little fast,front end very slow
    Input Parameter - Query retrival data - limit
    Only compnay code means record count will be 50 - 500 records -
    Only compnay code and comp ac number means record count will be 1-5
    Only compnay code,omp ac number and customer name means record count will be 1 - 5 records
    I have tried following ways
    1.Split the query using UNIOIN (OR clause seaparted) - Nested loops COST 850 , Nested loops COST 750 - index by row id - cost is 160 ,index by row id - cost is 152 full table access.................................
    2.Dynamic SQL build - 'DBMS_SQL.DEFINE COLUMN .....
    3.Given onlu one input parameter - Nested loops COST 780 , Nested loops COST 780 - index by row id - cost is 148 ,index by row id - cost is 152 full table access.................................
    Still im facing the same issue.
    Please help me out on this.
    Thanks and Regards,
    Oracle1001

    Sudhakar P wrote:
    the below query its take more than one minute while updating the records through pro*c.
    Execute 562238 161.03 174.15 7 3932677 2274833 562238Hi Sudhakar,
    If the database is capable of executing 562,238 update statements in one minute, then that's pretty good, don't you think.
    Your real problem is in the application code which probably looks something like this in pseudocode:
    for i in (some set containing 562,238 rows)
    loop
      <your update statement with all the bind variables>
    end loop;If you transform your code to do a single update statement, you'll gain a lot of seconds.
    Regards,
    Rob.

  • Using activex control in forms 6i(OWC11.Spreadsheet.11 control)

    Hi all,
    I want to use activex control OWC11.Spreadsheet.11 in forms6i
    does any one used this component in form6i ?
    any help/suggestions would appreciated

    when u load activex (spreedsheet) the corresponting menu also u can see when u run through which also you can set the attribute values
    im also check the same it is working
    sorry i saw it on design time
    kansih
    Edited by: Kanish on Apr 28, 2009 2:54 AM

  • Oracle Forms6i Implementation - help needed

    I have a table structure like below.
    CREATE TABLE test
    test_seq_no NUMBER,               -- Primary key
    test_case_id VARCHAR2 (15) NOT NULL,
    test_dct_seq_no NUMBER (4),
    test_atyp_code VARCHAR2 (6) NOT NULL,
    test_pid NUMBER (8) NOT NULL,
    test_act_text VARCHAR2 (100),
    test_due_date DATE,
    test_assn_date DATE DEFAULT SYSDATE,
    test_assn_user_id VARCHAR2 (30) DEFAULT USER
    TEST_CASE_ID, TEST_DCT_SEQ_NO, TEST_ATYP_CODE and TEST_PID fields are coming from 4 different tables. Users need a screen with two blocks for data entry into this table.
    Upper block will have following fields in a tabular format with maximum of 4 records.
    TEST_ATYP_CODE,      TEST_PID,     TEST_PID_DESC,     FREE_TEXT_FIELD,     DUE_DATE
    And in 2nd block, they have following in tabular format with 10 records.
    TEST_CASE_ID,      TEST_CASE_DESC,      TEST_DCT_SEQ_NO,     TEST_DCT_SEQ_NO_DESC
    They want to assign action type (TEST_ATYP_CODE) to users (TEST_PID) in 1st block and then create multilple CASE entries into 2nd block.
    e.g. If they have 2 records entered in assignment block (first block) and 4 records in 2nd block, it should save 2x4 = 8 records into the table.. meaning all
    values in each record of 1st block are applied to all records in the 2nd block.
    They also want to query on this form and want to re-assign or change the ACTIONS or ASSIGNEES or CASES on multilple records in one go.
    How can I do this in Oracle Forms6i?
    I am thinking to suggest them to change screen layout to have all table fields in ONE block (since they are from ONE table) and let them set the DEFAULT values in 1st control block which are used for creating 2nd block entries.
    Please suggest any ideas for implementation? Like, how many data blocks, control blocks and how to handle query, inserts etc.
    Thanks!

    Thank you for replying.
    Well, table structure is normalized and even if i further split the table, it can become master-detail but they don't want to save the details for each master. They want to enter multiple masters and multiple details in one go. e.g. if they entered 2 records in master block and 4 records in details, it should save 2x4 = 8 records at once.
    You are right, it can work first time... I can create two blocks. One control block and one DB detail block and for each control record I can save all details and then go to next control record and save all details for it and so on. But how will I keep track if they need to change just one instance of either control or detail.
    Another possibility would be that they select a control record for which they want to enter details and let system populate the control values into detail and they enter rest of details. But this will require more data entry to create details for each control record.
    Any ideas are welcome!

  • Java bean from oracle Forms6i

    Hi Guys,
    I am calling java bean from oracle Forms6i (implementation
    class property set to bean class). This java bean in turn
    calling some JNI methods written in C. The application server
    (Forms6i) is hanging at the point of calling the JNI method.
    Is oracle Forms6i supports all java functionality (JNI here)
    and if so how to solve the problem ?
    Any pointers or tips in this regard is highly appreciated ?
    Thanks & Regards
    Chandra Mohan

    To call Java from forms:
    look at the technical documents on Java integration at
    http://otn.oracle.com/products/forms
    and also look at the Javabeans and PJC samples in the sample
    code section of Forms on OTN.
    Creating a random number using a java class is an excelent
    example of how to use Java with forms.

  • IS Yahoo Messenger applicable with Oracle Forms6i?

    Hi guys,
    Im doing a project regarding the Job Request module using Orcle forms6i. This module will be using by a lot of users per Departments and i want every transactions..every job request entered would be well monitored between me and my users. Im planning to use the Yahoo Messenger to be part of it. I want every transactions posted or approved would be monitor through this Yahoo Messenger. Theres a message coming from this yahoo messenger "that certain transactions was Approved by a USER". Is this possible to use the Yahoo Messenger with Oracle Forms6i?
    Thank you.
    Lala

    I know there is a 'Oracle XMPP/Jabber Instant Messenger' available for the Oracle database on sourceforge.net. You can then sent message from the database to i.e. a google talk client.
    And I also added a pluggable java component inside Oracle Forms 10gR2. [http://www.screentoaster.com/watch/stUEJUR0NIR1pbR19bWlpYU1dS/chat_bean_inside_oracle_forms|http://www.screentoaster.com/watch/stUEJUR0NIR1pbR19bWlpYU1dS/chat_bean_inside_oracle_forms]but I don't know if it can be added to Forms 6i.
    Please mark if it helps.

  • Oracle Forms6i  with Reports10

    Dear all,
    has anybody experiences using Oracle Forms6i together with Reports10?
    Actually we use Forms and Reports6i. But we have to switch to Reports10. Can anyone tell me how I can call the reports now from my Forms Application?
    Actually we start the reports from the application with "'rwrun60...".
    Thanks in advance
    Yvonne

    hello,
    or this article on metalink
    Note:207396.1
    How to Run Reports From Forms 9i / 10g Using RUN_REPORT_OBJECT?
    regards

  • Error while using P2V in Oracle VM 2.2 version

    Error while using P2V in Oracle VM 2.2 version
    I tried using this option by using the steps given on one link but it didnt worked...
    Error:
    code 404, message No permission to list directory.
    I ve tried giving full permissions on for /OVS on Server but invain.
    Can U pls help me...
    Thanks in advance.
    Edited by: user10310678 on Sep 16, 2009 3:32 AM

    user10310678 wrote:
    I am using beta version. Oracle VM Manager 2.2.0If you have a beta version of 2.2, then you should be an Oracle employee. Please ask this question on an internal mailing list. If you are not an Oracle employee, please ask the employee that gave you this beta. As this is a beta, some functionality may not be operational yet, so I can't answer why this particular feature seems not to work.

  • Query on using Variables in Oracle Query

    Hi
    i am new to Oracle, i have tried extracting data from the Oracle Database using the following Query which includes 1 variable SYSDATE_UTS, however when i try to execute the Query i get an error. Please let me know what am i doing wrong and how can i correct it.
    Error Message
    ORA-06550: line 4, column 1:
    PLS-00428: an INTO clause is expected in this SELECT statement
    Oracle Query
    DECLARE SYSDATE_UTS NUMBER := (sysdate-to_date('19700101','yyyymmdd'))*86400;
    BEGIN
    SELECT
    INCIDENT_NUMBER,
    to_date(to_char((1/86400*REPORTED_DATE)+to_date('19700101','yyyymmdd'),'mm/dd/yyyy hh24:mi:ss'),'mm/dd/yyyy hh24:mi:ss') as REPORTED_DATE_TIME,
    ,GROUP_TRANSFERS
    ,LAST_MODIFIED_BY
    ,to_date(to_char(to_date('01011970','ddmmyyyy')+1/24/60/60 * LAST_MODIFIED_DATE,'mm/dd/yyyy hh24:mi:ss'),'mm/dd/yyyy hh24:mi:ss') as LAST_MODIFIED_DATE
    ,(to_date(to_char(to_date('01011970','ddmmyyyy')+1/24/60/60 * SYSDATE_UTS,'mm/dd/yyyy'),'mm/dd/yyyy')) - (to_date(to_char(+to_date('19700101','yyyymmdd')+1/86400*REPORTED_DATE,'mm/dd/yyyy'),'mm/dd/yyyy')) as AGE
    ,CASE
    WHEN (to_date(to_char(to_date('01011970','ddmmyyyy')+1/24/60/60 * SYSDATE_UTS,'mm/dd/yyyy'),'mm/dd/yyyy')) - (to_date(to_char(+to_date('19700101','yyyymmdd')+1/86400*REPORTED_DATE,'mm/dd/yyyy'),'mm/dd/yyyy')) BETWEEN 0 AND 1 THEN '0-1 Days'
    WHEN (to_date(to_char(to_date('01011970','ddmmyyyy')+1/24/60/60 * SYSDATE_UTS, 'mm/dd/yyyy'),'mm/dd/yyyy')) - (to_date(to_char(+to_date('19700101','yyyymmdd')+1/86400*REPORTED_DATE,'mm/dd/yyyy'),'mm/dd/yyyy')) BETWEEN 2 AND 4 THEN '2-4 Days'
    WHEN (to_date(to_char(to_date('01011970','ddmmyyyy')+1/24/60/60 * SYSDATE_UTS,'mm/dd/yyyy'),'mm/dd/yyyy')) - (to_date(to_char(+to_date('19700101','yyyymmdd')+1/86400*REPORTED_DATE,'mm/dd/yyyy'),'mm/dd/yyyy')) BETWEEN 5 AND 9 THEN '5-9 Days'
    WHEN (to_date(to_char(to_date('01011970','ddmmyyyy')+1/24/60/60 * SYSDATE_UTS,'mm/dd/yyyy'),'mm/dd/yyyy')) - (to_date(to_char(+to_date('19700101','yyyymmdd')+1/86400*REPORTED_DATE,'mm/dd/yyyy'),'mm/dd/yyyy')) BETWEEN 10 AND 19 THEN '10-19 Days'
    WHEN (to_date(to_char(to_date('01011970','ddmmyyyy')+1/24/60/60 * SYSDATE_UTS,'mm/dd/yyyy'),'mm/dd/yyyy')) - (to_date(to_char(+to_date('19700101','yyyymmdd')+1/86400*REPORTED_DATE,'mm/dd/yyyy'),'mm/dd/yyyy')) >20 THEN '20+ Days'
    ELSE 'UNKNOWN'
    END AS AGE_GROUP
    FROM IncidentDataBase
    and STATUS not in (4,5,6)
    and rownum <10;
    END;

    Hi Frank
    i am using the following Oracle Version
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
    PL/SQL Release 10.2.0.5.0 - Production
    CORE     10.2.0.5.0     Production
    TNS for Linux: Version 10.2.0.5.0 - Production
    NLSRTL Version 10.2.0.5.0 - Production
    and Quest Toad for Oracle to write and execute the queries:
    Toad for Oracle Xpert
    Version 10.1.1.8
    The code i am using is:
    variable SYSDATE_UTS NUMBER;
    exec SYSDATE_UTS := (sysdate-to_date('19700101','yyyymmdd'))*86400;
    SELECT
    INCIDENT_NUMBER,
    to_date(to_char((1/86400*REPORTED_DATE)+to_date('19700101','yyyymmdd'),'mm/dd/yyyy hh24:mi:ss'),'mm/dd/yyyy hh24:mi:ss') as REPORTED_DATE_TIME
    ,GROUP_TRANSFERS
    ,LAST_MODIFIED_BY
    ,to_date(to_char(to_date('01011970','ddmmyyyy')+1/24/60/60 * LAST_MODIFIED_DATE,'mm/dd/yyyy hh24:mi:ss'),'mm/dd/yyyy hh24:mi:ss') as LAST_MODIFIED_DATE
    ,(to_date(to_char(to_date('01011970','ddmmyyyy')+1/24/60/60 * :SYSDATE_UTS,'mm/dd/yyyy'),'mm/dd/yyyy')) - (to_date(to_char(+to_date('19700101','yyyymmdd')+1/86400*REPORTED_DATE,'mm/dd/yyyy'),'mm/dd/yyyy')) as AGE
    ,CASE
    WHEN (to_date(to_char(to_date('01011970','ddmmyyyy')+1/24/60/60 * :SYSDATE_UTS,'mm/dd/yyyy'),'mm/dd/yyyy')) - (to_date(to_char(+to_date('19700101','yyyymmdd')+1/86400*REPORTED_DATE,'mm/dd/yyyy'),'mm/dd/yyyy')) BETWEEN 0 AND 1 THEN '0-1 Days'
    WHEN (to_date(to_char(to_date('01011970','ddmmyyyy')+1/24/60/60 * :SYSDATE_UTS, 'mm/dd/yyyy'),'mm/dd/yyyy')) - (to_date(to_char(+to_date('19700101','yyyymmdd')+1/86400*REPORTED_DATE,'mm/dd/yyyy'),'mm/dd/yyyy')) BETWEEN 2 AND 4 THEN '2-4 Days'
    WHEN (to_date(to_char(to_date('01011970','ddmmyyyy')+1/24/60/60 * :SYSDATE_UTS,'mm/dd/yyyy'),'mm/dd/yyyy')) - (to_date(to_char(+to_date('19700101','yyyymmdd')+1/86400*REPORTED_DATE,'mm/dd/yyyy'),'mm/dd/yyyy')) BETWEEN 5 AND 9 THEN '5-9 Days'
    WHEN (to_date(to_char(to_date('01011970','ddmmyyyy')+1/24/60/60 * :SYSDATE_UTS,'mm/dd/yyyy'),'mm/dd/yyyy')) - (to_date(to_char(+to_date('19700101','yyyymmdd')+1/86400*REPORTED_DATE,'mm/dd/yyyy'),'mm/dd/yyyy')) BETWEEN 10 AND 19 THEN '10-19 Days'
    WHEN (to_date(to_char(to_date('01011970','ddmmyyyy')+1/24/60/60 * :SYSDATE_UTS,'mm/dd/yyyy'),'mm/dd/yyyy')) - (to_date(to_char(+to_date('19700101','yyyymmdd')+1/86400*REPORTED_DATE,'mm/dd/yyyy'),'mm/dd/yyyy')) >20 THEN '20+ Days'
    ELSE 'UNKNOWN'
    END AS AGE_GROUP
    FROM IncidentDataBase
    WHERE STATUS not in (4,5,6)
    and rownum <10;
    Notes:
    1. When i put the cursor before "variable" (starting of the query) and execute the script i get an Error: ORA-00900: invalid SQL statement.
    2. When i put the cursor just before "SELECT" i get a pop up.
    a. it is a Toad window which displays the available variables (in this case :SYSDATE_UTS).
    b. gives me a dropdown option to select the type (by default VARCHAR2 is selected).
    c. there is a value field where i need to enter the value for the Variable.
    d. the SQL statement shown in this dilog box does not include the 1st 2 lines
    variable SYSDATE_UTS NUMBER;
    exec SYSDATE_UTS := (sysdate-to_date('19700101','yyyymmdd'))*86400;
    Q: is there something wrong in the syntax i am using?
    Sven W. - I have been using your method all these days, which works just fine. i wanted to know how i could use a variable instead.
    Business Requirement - My whole intent is to calculate the Age of an incident (Difference between "Reported Date" and current date) and to assign Age Groups (0-1 Days, 2-4 Days,....,20+ Days).
    Edited by: 921713 on Mar 19, 2012 12:23 PM

  • Need help in using ActiveX to retrieve a VARIANT

    Need help in using ActiveX to retrieve a VARIANT.
    Variant is shown as       var{VT_Ul1,1}  in debug
    Using the following
    hr = CA_VariantGetShort (&var, &value);
    I get 0 for my answer instead of 1.
    Solved!
    Go to Solution.

    Answered my own question.
    VT_Ul1 is an unsigned char and not a short.

  • Unable to print crystal report over web using ActiveX Control

    Post Author: jimmyp
    CA Forum: General
    We have a problem with printing crystal report over web using ActiveX Control.  When clicking print button, it only shows a blank dialog web crystal viewer page without any error.  The page just simply hangs.  We installed the PrintControl DLL and enable all the security setting for ActiveX Control for IE.  It still does not print.  Does anyone know why?  
    Environment.
    Bundle Crystal Report v10
    Asp.net 2.0
    IE 6.0 or higher.
    Appreciate for your help.
    Jimmy

    Post Author: Ian Kulmatycki
    CA Forum: General
    A team member here found this, I haven't read it, I'm not sure if our problems are related to this, but hopefully it helps someone:
    -ian
    When Secure Sockets Layer (SSL) is enabled, using the ActiveX control to print reports from a Crystal 10 DHTML viewer results in the following error message:
    "A communication error occurred, printing will be stopped."
    How can this error message be resolved?
    Resolution
    This is a known issue with Crystal Reports 10 and Crystal Enterprise 10 viewers and has been tracked. The Track ID is ADAPT00282199.
    This error occurs due to the receiving application performing a case-sensitive check for the HTTPS request header value "ON". When a sender application sends the value as "on" in lower case, the error occurs. The update below changes the receiving application to be case-insensitive.
    Hot Fixes or Service Packs address this issue as indicated below. With the updates, this issue is resolved.
    Unless indicated otherwise, Weekly Hot Fix updates from our FTP site have only been tested with English versions of products.
    For Crystal Reports 10 and Crystal Enterprise 10, the update for this issue is included in the Crystal 10 Viewers Weekly Hot Fix (WHF). This is available in English only at the following location:
    ftp://ftp.crystaldecisions.com/outgoing/EHF/viewers10win_en.zip
    This issue is addressed in the following components (and later versions):
    PageObjectModel.dll, version 10.0.5.785, dated 8/25/2004
    ReportRenderer.dll, version 10.0.5.785, dated 8/25/2004
    WebReporting.dll, version 10.0.5.785, dated 8/25/2004

  • How to control and display video from IP camera using ActiveX control over Internet.

    Hello,
    I need to control my IP cameras over the internet. I need to log into the cameras and then display the video.  There's an ActiveX control registered on the computer and works fine with IE to access and control the cameras. Controlling the cameras using IE works fairly well, but there are some quirks that I'd like to eliminate by using my own custom code.
    Has anyone created a vi that controls a Foscam FI8905W over the Internet? I’ve attempted, but I keep getting a catastrophic failure when I try to call ManagementConnect Method in the DVM_IPCam2 ActiveX Control Module V1.0. I'm not sure whether I need to establish an IP connection with the cameras first, or allow the ActiveX control to establish it for me.
    Some example code would be greatly appreciated. Running LabVIEW 2011 on a Win7 32bit.  Even some code used to control a similar device using ActiveX over Internet would be helpful.

    I have an example vi for interfacing to the foscam activex.
    I plan on using mouse click events within the activex window to trigger the PT function.
    I only have the basic up/down/right/left directions and not the down-right/down-left/up-right/up-left in the enum.  You can load the camera's web page and view the source to see the Java script code that uses the activex control.  There are definitions for the other directions.
    I had to mark the control as "Disabled" to keep click events from going to the activex control.  If I double click the control, it goes full screen.  If I then click on it to get out of full screen mode the video never returns or returns to the wrong spot in the VI.
    Attachments:
    Foscam Demo.vi ‏24 KB

  • Can we use different Databases (Oracle & SQL Server) in one report?

    Post Author: venki5star
    CA Forum: .NET
    Hi there.
    Can we use different databases (Oracle & SQL Server) in a same report?
    If possible how?
    Another question,
    Can we change the Provider Name at runtime of the given report. If so the above question is useless...
    Thanks in Advance.

    I tried this using Oracle Provider for OLEDB (the one that supplied by Oracle Client) and Crystal Reports 9. you can drag the column into designer but the image does not appear in preview.
    I guess it's because CR does not recognized it as image, and there are no information that the blob data is an image at all.

Maybe you are looking for

  • [SOLVED] Arch doesn't recognise software RAID0

    Problem solved! See my last reply for the solution. Old post follows: I currently have Windows installed on a 2x500GB RAID0, with 300GB unallocated space for Arch. However, the Arch Live CD doesn't recognise the RAID0 for whatever reason. Or perhaps

  • Music app problem's in ios6? i can't see a few artists in the list.

    Hi guys, i update my iPhone 4s yesterday from 5.1.1 to 6, everytime i sent a new music from iTunes to iPhone, in the artists list, doens't show any artist i have, if i goes to the songs list, all my musics appears, btw in the artists no, i just want

  • How do I send a purchased movie to the iCloud from my Windows pc please?

    I have been trying without success to send purchased movies in my iTunes account to the iCloud to free up space on my laptop. Every time I try the movie is deleted, literally gone. What am I doing wrong please and how do I move a movie to the iCloud

  • Total landed cost in MM pricing

    i cant understand how system is calculating the Total landed cost it is showing 20,310.40 Can anyone pls check ZBP0     Basic Price                 100.00      INR     1     KG     10,000.00 ZJDV     Discount quantity                          INR    

  • Transport Tax codes.

    Hi , I have the  requirement to create new tax codes but somehow they are already created in Development I need to follow all these steps .How can I move them to Test enviorment and production what is the best way to move all configurations: New Tax