Need help, run the stored procedure in ASP.

I have a web page in which I would use a query like http://ereply.us/q/l.asp?id=383966476 string

It directs the user to a page that contains the following code:

<!-queue = "database_connection.asp #include" - > "
< %
If not isempty (request.querystring ("id")) then
SQL = "exec dbo.fp_qr_code @sequence (request.querystring ("id")) =" "

If rs.state = 1 then rs.close
RS. Open sql, conn, 3, 2

If rs.recordcount <>0 then
session("Name") = rs ("name")
session("JobID") = rs ("jobid")
session("SEQ") = rs ("seq")

If rs ("id") <>"" then the answer. " Redirect ("index.asp")
end if
end if
% >

It queries a SQL database to return the value of 'name '. In turn, according to the code of the user should be directed to 'Index.asp' that contains:

Welcome < % response.write (session("name")) % >

And the page you should see the page with"Welcome".  Instead, I get a server 500 error.  The stored procedure runs as a stand-alone query in SQL Management Studio.

Any ideas would be greatly appreciated.

I solved this.  This is the query that worked:

< %="">< br="">SQL = "" exec fp_qr_code ' "& request.querystring ("id") &" ' " < br=""> set rs = Conn.Execute (sql) < br=""> if rs.eof then response.write ("no registration") < br=""> while not rs.eof" ""
response.write (("name") rs)

response.write (("imgname") rs)

response.write (rs ('url'))

RS.MoveNext
Wend < br=""> %>

Tags: Dreamweaver

Similar Questions

  • Run the stored procedure of c#

    Hi, im new to the use of stored procedures and I have the following stored procedure...

    CREATE OR REPLACE PROCEDURE DRL_PROCEDURE2 (var_SOURCE_OBJECTID IN varchar2, var_NEW_OBJECTID OUT varchar2)
    AS
    BEGIN
    SELECT MAX (NEW_OBJECTID)
    IN var_NEW_OBJECTID
    OF DRL_CONVERSION
    WHERE SOURCE_OBJECTID = var_SOURCE_OBJECTID;
    END;

    I want to be able to call this procedure from my windows form application and display the result of the stored procedure in a label... could someone please help me! Thanks in advance!

    http://www.csharpfriends.com/articles/getarticle.aspx?articleid=78
    You can find out how to call the stored procedure (in the link above you will find an example of SQL Server 2005 that also work for you from your oracle stored procedure) in c#.

    HTH
    Girish Sharma

  • setting report parameters fails for the report that runs the stored procedure in QMR FDM 2.1.1

    Hello

    Can someone help us please on this issue we have; If a solution is already available somewhere on the forum please link me to it.

    Please see our situation;

    The script below was part of the customization of a colleague to a script of Oracle FDM ("AftFileImport").

    There are no screenshots at this stage that came back to us with a temporary workaround.

    More detailed description:

    We built a custom report of FDM ("FSBValidationErrorsforAllLocations") that accepts two parameters (CatKey, period) and which calls a procedure stored in SQL Server with the same two parameters. FDM SQL statement of the report is:

    RUN FSBValidationErrorsforAllLocations ' ~ time ~', ~ Cat Key ~

    It works through the User Interface.

    When you try to put the two settings by customizing the event Oracle 'AftFileImport'script, the report fails. Below the part of the code in the 'AftFileImport', where we tried to fill values:

    • objReport.mParametersClear
    • objReport.mParametersAddNew "CatKey", RES. PstrCat
    • objReport.mParametersAddNew 'Period', RES. PstrPer

    We must understand why the way above to the definition of the parameters does not work with stored procedures, as seems to be the only documented way Oracle of setting parameters.

    Please let me know if that's enough.


    Thank you in advance.

    Hello

    which is the error when you run the script?

    • objReport.mParametersAddNew "Cat Key", RES. PstrCat

    Try again with the white space as it is how you named your parameter in the report definition, didn t you?

    Also try to use the built like the following examples:

    objRP.mParametersClear
    objRP.mParametersAddNew 'Period', CDate (dtePeriod)
    objRP.mParametersAddNew 'Loc', CLng (lngLocation)
    objRP.mParametersAddNew 'CatKey", CLng (lngCatKey)
    objRP.mParametersAddNew "TargAcct", CStr (strAutoMapAcct)

    Concerning

  • Need help on the DATA_REMAP procedure.

    Hi all

    I use API data pump to perform export and import. But the procedure 'data_remap' is thrown exceptions.

    SQL * more: release 11.1.0.7.0 - Production Fri Apr 10 04:29:09 2013
    Copyright (c) 1982, 2008, Oracle.  All rights reserved. +
    Connected to:+.
    Oracle Database 11 g Release 11.1.0.7.0 - 64 bit Production.


    We have a set of tables, which data must be exported. As a result of constraints to perform the export, we have:

    (1) only the table that contains a column (say test_id) must be exported. We're going to look for these tables by querying the view of "all_tab_columns" as {select table_name from all_tab_columns where column_name = 'test_id' and owner = user} this query retrieves approximately 40 paintings.

    (2) from this set of tables, we don't need the data that meet the condition {select * from < tablename > where test_id = 10}.

    (3) now we need to replace the test_id 10 a-1 value.


    Create or replace package TESTPACKAGE as body
    function SetTestID (p_TestId number) returns the number is
    number of v_TestId: = - 1;
    Start
    Return v_TestId;
    end;

    exportData procedure is
    number of H1; -The handful of job data pump
    Start
    H1: = dbms_datapump.open ('EXPORT',
    "TABLE."
    NULL,
    "EXAMPLE1"
    'LAST');

    dbms_datapump.add_file (h1,
    "example1.dmp,"
    'EXPORT');

    dbms_datapump.metadata_filter (handle = > h1,)
    name = > 'NAME_EXPR ',.
    value = > ' IN (select TABLE_NAME from ALL_TAB_COLUMNS where A.COLUMN_NAME = TEST_ID "and owner = user and not (A.TABLE_NAME as" PV %'') and not (A.TABLE_NAME as "IV %'') and not (A.TABLE_NAME as" IMV %'') and not (A.TABLE_NAME as "BIN$ %"))',)))
    object_type = > 'TABLE');

    dbms_datapump.data_filter (handle = > h1,)
    name = > 'subquery '.
    value = > 'WHERE TEST_ID = 10'.
    table_name = > null,
    schema_name = > null);

    dbms_datapump.data_remap (handle = > h1,)
    name = > 'COLUMN_FUNCTION ',.
    table_name = > "TABLE1."
    column = > 'TEST_ID. "
    function = > ' TESTPACKAGE. SETTESTID (10)',
    schema = > 'ATOM606');

    dbms_datapump. START_JOB (H1);
    end;

    end;


    But here data_remap procedure gives below error

    + "ORA-39232: invalid remap function: TESTPACKAGE.". SETTESTID (10) «+»

    Can anyone help the use of this procedure data_remap and how to get the value for the parameter of function? And how to specify the list of all of the table?

    Any help is appreciated. Thanks in advance :)

    Hello
    Just I just did a quick test that has worked well for me - but it seems no different than what you do - try to repeat this test and see if you get the same result.

    PUMPY@EITP>create table tab1(col1 number);
    
    Table created.
    
    PUMPY@EITP>create table tab2(col1 number);
    
    PUMPY@EITP>insert into tab1 values(1);
    
    1 row created.
    
    PUMPY@EITP>insert into tab2 values(1);
    
    1 row created.
    
    PUMPY@EITP>c/1/2
      1* insert into tab2 values(2)
    
    create or replace package TESTPACKAGE
    is
      function settestid(p_TestId number) return number;
      end TESTPACKAGE;
    /
    
    create or replace package body TESTPACKAGE
    as
      function SetTestID(p_TestId number) return number is
    v_TestId number := -1;
    begin
    return v_TestId;
    end;
    end TESTPACKAGE;
    /
    
    create or replace procedure exportData is
    h1 number; -- Data Pump job handle
    v_job_state       varchar2(4000);
    
    begin
    h1 := dbms_datapump.open(operation=>'EXPORT',job_mode=>'TABLE',job_name=>'HARRY');
    
    dbms_datapump.add_file(h1,'example1.dmp','DATA_PUMP_DIR');
    
    dbms_datapump.metadata_filter(handle => h1,name => 'NAME_EXPR',value => 'IN (select TABLE_NAME from USER_TABLES)',object_type => 'TABLE');
    
    dbms_datapump.data_filter(handle => h1,name => 'SUBQUERY',value => 'WHERE col1 = 1',table_name => null,schema_name => null);
    
    dbms_datapump.data_remap(handle => h1,name => 'COLUMN_FUNCTION',table_name => 'TAB1',column => 'COL1',function => 'PUMPY.TESTPACKAGE.SETTESTID',schema => 'PUMPY');
    
    dbms_datapump.start_job(h1);
    DBMS_DATAPUMP.WAIT_FOR_JOB (h1,v_job_state);
    DBMS_OUTPUT.PUT_LINE(v_job_state);
    
    end;
    /
    
    PUMPY@EITP>exec exportData;
    
    PL/SQL procedure successfully completed.
    
    PUMPY@EITP>drop table tab1;
    
    Table dropped.
    
    PUMPY@EITP>drop table tab2;
    
    Table dropped.
    
    PUMPY@EITP>exit
    
    [oracle@sl02190]:EITP:/oracle/export/EITP# impdp pumpy/pumpy dumpfile=example1.dmp
    
    Import: Release 11.2.0.3.0 - Production on Wed Apr 10 17:08:49 2013
    
    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
    
    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning option
    Master table "PUMPY"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
    Starting "PUMPY"."SYS_IMPORT_FULL_01":  pumpy/******** dumpfile=example1.dmp
    Processing object type TABLE_EXPORT/TABLE/TABLE
    Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
    . . imported "PUMPY"."TAB1"                              5.007 KB       1 rows
    . . imported "PUMPY"."TAB2"                              5.007 KB       1 rows
    Job "PUMPY"."SYS_IMPORT_FULL_01" successfully completed at 17:08:51
    
    [oracle@sl02190]:EITP:/oracle/export/EITP# sqlplus pumpy/pumpy
    
    SQL*Plus: Release 11.2.0.3.0 Production on Wed Apr 10 17:08:59 2013
    
    Copyright (c) 1982, 2011, Oracle.  All rights reserved.
    
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning option
    
    PUMPY@EITP>select * from tab1;
    
          COL1
    ----------
            -1
    
    PUMPY@EITP>select * from tab2;
    
          COL1
    ----------
             1
    
    PUMPY@EITP>
    
     
    

    And to answer your other question table cannot be null so yo uhave to specify each table you want to the remapping to apply to a separate call - you could just do this in a simple loop, well based on the SQL code that you already use more early to get the list of tables?

    Kind regards
    Harry

  • Dbms_metadata in a stored procedure. If the table is in the schema, run the stored procedure the procedure works very well.  If I try to get the table ddl to a different scheme it can't find table in a schema.  I run as an anonymous blocks and it works

    create or replace FUNCTION get_table_md (p_owner in varchar2, p_table IN VARCHAR2) RETURN CLOB IS
    -Define local variables.
    / * declare
    p_owner varchar2 (30): = "AVTYM";
    p_table IN VARCHAR2 (30): = "TRANSACTION_HEADER";
    */
    h NUMBER; -handle returned by OPEN
    e NUMBER; -handle returned by ADD_TRANSFORM
    p_tableref varchar2 (30);
    doc CLOB.
    Doc2 CLOB.
    BEGIN

    -Specify the type of object.
    h: = DBMS_METADATA. OPEN ('TABLE');

    -Use filters to specify the desired object.
    DBMS_METADATA. SET_FILTER (h, 'SCHEMA', p_owner);
    DBMS_METADATA. SET_FILTER (h, 'NAME', p_table);

    -Request that the metadata be transformed into creation DDL.
    th: = DBMS_METADATA. ADD_TRANSFORM (h, 'DDL');

    -Retrieves the object.
    doc: = DBMS_METADATA. FETCH_CLOB (h);


    -Free resources.
    DBMS_METADATA. Close (h);
    p_tableref: = substr (p_table, 1, 25). ' $RDEF';
    Doc2: is REGEXP_replace(doc,p_table,p_tableref,1,1,'im');.
    doc: = REGEXP_replace(doc2,'"CREATE_DT"','"EXCHANGE_DT"',1,2,'im');
    -dbMS_OUTPUT. Put_line (doc);
    RETURN doc;

    END;

    Hello

    check the privilege you may have granted by a role that you need direct access to the object and not by the role. You can test if you are granted by a role, by running the SET command role no and see if you can still run the anonymous block.

    Thank you

  • Error on the definition of the stored procedure in the simultaneous program

    Hello

    I created a stored procedure and wanted it attached to the concurrent program. The purpose of this stored procedure when you run it in simultaneous program, the system retrieves the data from the csv file downloaded from the server, then it will insert in the tables of SO / the Interface API. Below, the error occurred.


    * Starts * 18 April 2012 18:18:42
    Error ORACLE 6550 in FDPSTP

    Cause: FDPSTP failed due to the ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in the call to 'SPKO1 '.
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored

    Steps I did to set the stored proc
    < < simultaneous executable program > >

    Executable: RDRAGON_SO_IMPORT
    Short name: RDRAGON_SO_IMPORT
    Application: Order management
    Method of execution: PL/SQL, stored procedure
    Run file name: SPKO1

    < < concurrent program - set > >

    Program: RDRAGON SO IMPORT
    Short name: RDRAGON_SO_IMPORT
    Application: Order management
    Name of executable: RDRAGON_SO_IMPORT
    Method: PL/SQL, stored procedure

    Format: text
    No set

    -Here are my stored procedure-


    CREATE OR REPLACE PROCEDURE APPS. SPKO1 IS
    FH UTL_FILE. TYPE_DE_FICHIER;
    v_line VARCHAR2 (32767).
    v_source_id NUMBER (10);
    v_created_by NUMBER (10);
    v_creation_date DATE;

    v_org_id NUMBER (10);
    v_orig_sys_docref VARCHAR2 (50);
    V_Customer VARCHAR2 (360);
    v_customer_prev VARCHAR2 (360);
    v_sold_to_org NUMBER (10);

    v_orig_line_ref NUMBER (10);
    v_item_code VARCHAR2 (2000);
    v_ordered_qty NUMBER (10);
    v_selling_price NUMBER (10);
    v_count NUMBER (10);
    v_stat NUMBER;


    /******************************************************************************
    NAME: SPKO
    PURPOSE:

    REVISIONS:
    Worm Date Description of the author
    --------- ---------- --------------- ------------------------------------
    1.0 16/04/2012 administrator 1. Created this procedure.

    NOTES:

    Keywords to replace automatically available Auto:
    Object name: SPKO
    SYSDATE: 16/04/2012
    Date and time: 16/04/2012, 17:55:42 and 16/04/2012 17:55:42
    Username: admin (set in Options of TOAD, editor of the procedure)
    Name of the table: (defined in the dialog box "New PL/SQL object")

    ******************************************************************************/
    BEGIN
    v_source_id: = 6;
    v_created_by: = - 1;
    v_org_id: = 204;
    v_customer_prev: = null;
    v_orig_line_ref: = 0;
    v_stat: = 0;

    SELECT header_id in (DE) v_orig_sys_docref
    Select header_id
    of OE_ORDER_HEADERS_ALL
    creation_date desc order
    ) WHERE ROWNUM = 1;


    FH: = UTL_FILE. FOPEN ('XXANDDIR2', 'myfile1.csv', 'R', 32767);
    < < file_read_lines > >
    LOOP
    BEGIN
    UTL_FILE. GET_LINE (fh, v_line);

    V_Customer: = LTRIM (RTRIM (REGEXP_SUBSTR (v_line, "[^,] +' 1, 1") ',' "') ','" ');
    v_creation_date: = LTRIM (RTRIM (REGEXP_SUBSTR (v_line, "[^,] +' 1, 2") ',' "') ','" ');
    v_item_code: = LTRIM (RTRIM (REGEXP_SUBSTR (v_line, "[^,] +' 1, 3") ',' "') ','" ');
    v_ordered_qty: = LTRIM (RTRIM (REGEXP_SUBSTR (v_line, "[^,] +' 1, 4") ',' "') ','" ');
    v_selling_price: = LTRIM (RTRIM (REGEXP_SUBSTR (v_line, "[^,] +' 1, 5") ',' "') ','" ');
    v_orig_line_ref: = (v_orig_line_ref + 1);

    If v_stat = 0 then
    v_orig_sys_docref: = (v_orig_sys_docref + 1);
    end if;

    SELECT hca.cust_account_id from v_sold_to_org
    OF hz_cust_accounts AOB.
    HP hz_parties
    WHERE hca.party_id = hp.party_id
    AND hca.request_id is null
    AND hp.party_name = v_customer;

    If v_stat = 0 then
    INSERT INTO OE_HEADERS_IFACE_ALL)
    order_source_id,
    orig_sys_document_ref,
    org_id,
    CREATION_DATE,
    created_by,
    last_update_date,
    last_updated_by,
    operation_code,
    sold_to_org_id,
    booked_flag)
    VALUES)
    v_source_id,
    ('TEST' | v_orig_sys_docref).
    v_org_id,
    v_creation_date,
    v_created_by,
    v_creation_date,
    v_created_by,
    "INSERT."
    v_sold_to_org,
    'Y') ;
    commit;
    end if;

    INSERT INTO OE_LINES_IFACE_ALL)
    order_source_id,
    orig_sys_document_ref,
    orig_sys_line_ref,
    inventory_item,
    org_id,
    ordered_quantity,
    unit_selling_price,
    unit_list_price,
    CREATION_DATE,
    created_by,
    last_update_date,
    last_updated_by,
    operation_code)
    VALUES)
    v_source_id,
    ('TEST' | v_orig_sys_docref).
    v_orig_line_ref,
    v_item_code,
    v_org_id,
    v_ordered_qty,
    v_selling_price,
    v_selling_price,
    v_creation_date,
    v_created_by,
    v_creation_date,
    v_created_by,
    "INSERT");
    commit;

    v_customer_prev: = v_customer;
    If v_customer_prev = v_customer then
    v_stat: = 1;
    on the other
    v_stat: = 0;
    end if;
    -DBMS_OUTPUT. Put_line ('Col1: ' | v_source_id |', Col2: ' | v_creation_date |', Col3: ' | v_created_by |', Col4: ' | v_updated_date |', Col5: ' | v_updated_by);
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    OUTPUT file_read_lines;
    END;
    END LOOP;
    SELECT count (*) in the OE_HEADERS_IFACE_ALL v_count;
    DBMS_OUTPUT. Put_line (' record Total inserted successfully: ' | v_count);
    UTL_FILE. FCLOSE (FH);

    END SPKO1;
    /


    But when I run the stored procedure using TOAD his work.

    Help, please. This is my first time to attach the stored procedure in the concurrent program.

    Thank you very much.

    Kind regards
    Diane

    Published by: peopsquik08 on April 18, 2012 03:58

    as clive_t solier
    >
    You must explicitly reference the settings out
    >

    Try

    DECLARE
    VFILE VARCHAR2(32767);
    V_SOURCE_ID NUMBER;
    --
    ERRBUF VARCHAR2(200);
    RETCODE NUMBER;
    
    BEGIN
    VFILE := 'myfile1.csv';
    V_SOURCE_ID := 6;
    
    --APPS.OMORDERLOADER.SPKO1 ( VFILE, V_SOURCE_ID );
    --COMMIT;
    
    APPS.OMORDERLOADER.SPKO1(
        ERRBUF => ERRBUF,
        RETCODE => RETCODE,
        VFILE => VFILE,
        V_SOURCE_ID => V_SOURCE_ID
      );
    END;
    

    but the code above to test your proc

    to run concurrent SQL, you can use fnd_submit.submit_program

  • How can I force DAC to run always full load for one of the task that executes the stored procedure? And remaining tasks load incremental in the second and sub sequent executions.

    Hello

    How can I force DAC to run always full load for one of the task that executes the stored procedure? And remaining tasks load incremental in the second and sub sequent executions.

    Thank you

    Jay.

    Hi if your task is running an informatica mapping you can set your DAC task to run the full mapping for incremental and full loads, so tab task just point to the mapping.

    Hope that helps.

    Thank you

  • How to view the run log in the stored procedure?

    Hello

    I'm working on a project of migrating from Sybase to Oracle (10g).

    On Sybase, when I run a stored procedure, it will connect to the console as:
    100 rows inserted
    200 rows affected
    ...

    One line per request in the stored procedure.


    Oracle, I only: 'Procedure completed successfully' (Yes, I'm french :-)


    Is there a way to get the logs for each request in my stored procedure?
    -An option?
    -One command after each request?


    Thanks in advance.

    user9321154 wrote:
    OK, it's great.

    Otherwise, there is not an option on Oracle to achieve this same result automatically.

    No, if you want to do this, you must do it yourself. PL/SQL is a real language, not a script like T - SQL language. Therefore, it is the procedure that one is successful or not, not every instruction.

    You should also be aware that if you use % ROWCOUNT SQL to get the number of rows processed and DBMS_OUTPUT. Put_line to show them on the screen, that the output will not appear before once you have completed the process, not as each DBMS_OUTPUT statement is processed.

    If you want to t shelves where in the procedure, you will need to insert the release of record in a table by using an autonomous transaction or something like UTL_FILE use to write the instructions in an o/s file.

    John

  • How to run a stored procedure by using the steps in database?

    Hello

    I'm trying to run some procedures of the store and it will not work.

    See the file attached is seq.

    I have a varchar parameter (50), which must also be provided to the stored procedure and it returns an int.

    To do this I had to only use data in an open statement

  • Execution of the stored procedure Oracle EF6 error.

    Hello

    Need help with the oracle error

    {"ORA-06550: line 1, column 8:"}

    PLS-00306: wrong number or types of arguments in the call to "sp_name".

    ORA-06550: line 1, column 8:

    {"PL/SQL: statement ignored '}

    This error occurs when the code runs the line in Vb.net application in Model Designer

    MyBase.ExecuteFunction ("sp_name" para1, para2, para3, dOBpara4, para5)

    I create the SSDL and CSDL, MSL files for oracle to MS SQL connection by the method mentioned in the link JasonShort - professional profile - CodeProject it worked perfectly fine without the stored procedures. I managed to insert, update, and delete records. Then, I created stored procedures for Insert, Update, Delete. It worked fine with MS SQL. I copied and updated oracle files respectively. I gives me the error mentioned above.

    I executed stored procedures in Oracle SQL Developer, and it works without error. But when it is executed via the model there is light of the error. Can anyone let me know the solution for this error. I'm using VS2010, EF6, Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production

    Thank you

    Prachin Soparkar

    Hello

    Sorry for the inconvenience. After I posted this question I took a break and saw that the error was nothing, but I had given FNAME as parameter name in MS SQL. In oracle when I created the sp I created the parameter with p_FNAME. Where the schema defined in the language SSDL and CSDL, MSL had to be changed to MS, but since I want to that it would be same in different databases, I choose to have changed it in oracle stored procedure. The error msg is confusing, it should be something not found parameter or incompatibility etc.

    Thank you

    Prachin Soparkar

  • In a table - looping through the rows and the stored procedure call

    APEX version: 3.2.0.00.27

    Hello

    I searched the forum and tried a few things but could not make it work.

    I have a tabular presentation, developed with the help of the ATD (Cascading LOV - method of tabular presentation - AJAX - ATD )

    What I'm trying to do now:
    -After submit and validations, loop through all the lines and
    -call a stored procedure passing 3 parameters obtained from each of the lines on the form of tables. This procedure will be an update of a database table.

    On the forum, I found that I could do the loop "* FOR i IN 1..." APEX_APPLICATION.g_f03. "LOOP COUNT *" syntax.

    Only for testing purposes, I tried just to view information with the following (On Load - after a footer) process (example of Denes Kubicek == > http://deneskubicek.blogspot.com/2009/05/execute-javascript-throuhg-plsql.html):
    declare
      v_today  varchar2 (200);
    begin
    --  :P40_test := APEX_APPLICATION.g_f03(1);
    --  :P40_test2 := APEX_APPLICATION.g_f04.COUNT;
      :P40_test2 := 100;
    
      v_today := to_char (sysdate, 'dd.mm.yyyy');
    
    --FOR i IN 1.. APEX_APPLICATION.g_f03.COUNT LOOP 
    
      :P40_test := APEX_APPLICATION.g_f02(2);
    
      HTP.p ('<script type="text/javascript">');
      HTP.p (   'alert(''Today is '
              || v_today
    --          || APEX_APPLICATION.g_f04(APEX_APPLICATION.g_f03(i))
              || '.\n'
              || 'end!'');'
             );
      HTP.p ('</script>');
    
    --    :P40_test := APEX_APPLICATION.g_f02(APEX_APPLICATION.g_f02(i));
    
    --END LOOP;
    
    end;
    The foregoing would give me a ' * ORA-01403: no data found * ' message. I tried through various variants of APEX_APPLICATION.g_f0* #*, but still can't get anything to display correctly. In commenting on all the lines referring to APEX_APPLICATION.g_f0x above, the date would be are they displayed fine.

    I tried uncomment the FOR... LOOP and play with the code (defining the process runs "On submit - after calculations" and Validations), I got was a ' * ORA-06502: PL/SQL: digital error or value: character conversion number error * "message.

    Here is the script of the form in a table:
    select 
    "V"."MSLINK",                                       -- hidden (number)
    "V"."INSTALLATION_DATE",                        -- editable date picker
    "V"."MANUFACTURER_INDICATOR",              -- editable (cascading LOV -- text)
    "V"."MODEL_INDICATOR",                           -- editable (cascading LOV -- text)
    "V"."DIAMETER_INDICATOR",                      -- editable (LOV -- number)
    "V"."PURPOSE_INDICATOR",                        -- editable (LOV -- text)
    "V"."VALVE_NUMBER",                                -- shown but not editable -- number
    "V"."MODIFY_DATE",                                  -- shown but not editable
    "V"."MODIFY_USER",                                   -- shown but not editable
    "V"."VALVES_STYLE"."FEATURE"                  -- shown but not editable -- number
    from "#OWNER#"."VALVES" "V"
    Where
      "V"."PROJECT_ID" = :P1_PROJECT_NUMBER AND
      "V"."VALVES_DFLAG" = 0
    Regarding the parameters for the stored procedure, it would the MSLINK, VALVE_NUMBER and the VALVES_STYLE. FEATURE.

    Help, please!
    (Sorry for the long post).

    Thank you

    Tan

    Hi, Tan,

    I have not seen that type of object - I've only used custom types for purposes of test years ago and have never used their within Apex!

    One possibility is that the value of checksum being is based on all of the content of these fields, rather than only the part of the FEATURE. If there are other parts of the object, you could include those items as well.

    Otherwise, as you f01 KP for a record, you will need to retrieve the values of the FUNCTION in your PL/SQL code directly from the table (because the user cannot modify these fields, you can be sure that the values in the table will be still valid).

    Andy

  • How can I transfer content from an XML file in a MS SQL database of the stored procedure using LabWindows/CVI SQL Toolkit?

    Hello

    I have a problem to transfer content to an XML file in a MS SQL database through a stored procedure data/fixed. I am able to transfer the content of the file using method...

    HSTMT = DBPrepareSQL (hdbc, EXEC usp_InsertReport " ... ");

    resCode = DBExecutePreparedSQL (hstmt);

    resCode = DBClosePreparedSQL (hstmt);

    ... but in this case, I am not able to read the return value of the stored procedure.

    I tried to follow the example of the stored procedure in the help documentation (DBPrepareSQL), but I miss a xml data type?

    No idea how to solve my problem?

    Cake of KR

    DianaS salvation,

    Thanks for your comments. During this time I found another way which fullfill my needs:

    resCode = DBSetAttributeDefault (hdbc, ATTR_DB_COMMAND_TYPE, DB_COMMAND_TEXT);

    sprintf (sz_SqlStatement, "DECLARE @TESTID INT EXEC @TESTID = usp_InsertReport ' SELECT 'RetVal' %s = @TESTID", sz_Buffer ");
    HSTMT = DBActivateSQL (hdbc, sz_SqlStatement);

    While ((resCode = DBFetchNext (hstmt)) == DB_SUCCESS)

    {

    / * Enter values in the record. */

    resCode = DBGetColInt (hstmt, 1, & s32_TestId);
    }

    resCode = DBDeactivateSQL (hstmt);

    sz_Buffer is the content of the XML file.

    Cake of KR

  • Block based on the stored procedure cannot modify Default_where clause

    Hi all

    I tried to create a block based on the stored procedure that it works very well with the result set for the refcursor. But if I need to add filters on the block using where clause in the palette of goods or

    using the property block set in where clause, it does not error but does not review filters .

    tried everything to you please let me know. This is a restriction whereby we can set filters on the block when we create the block based on the stored procedure.

    Thank you

    Check in Form Builder Help:

    Creating a block of data from a procedure that uses a ref cursor

    ... You can't pass a WHERE or ORDER BY clause clause in a stored procedure.

    But you can send your WHERE condition using the query Source Arguments.

    If the procedure is on the side of the database (not in the forms module), ensure that the procedure is not vulnerable to injection of SQL code.

    Kind regards

    Zlatko

  • Fall in the stored procedure option

    Hi Expert,

    I created the option in one of my stored procedure for testing purposes and now I am trying to drop the option and let the stored procedure, anyone know how I can do? Thank you!

    If what you want is to eliminate the Option that you have created in your Proc, you only need to:

    Expand the sign + to the left of you proc;

    Select the option that you want to remove;

    Press DELETE, or right-click and delete:

    I hope this can help you!

  • need help to convert this procedure used and call in coldfusion

    Hi I'm new to coldfusion and I haed of the code with me and I need it to convert in the stored procedure and will call back within coldfusion. Can someone help me how to make these data to the stored procedure and calling in coldfusion.

    Here is the code of my

    SET NOCOUNT ON

    DECLARE
    @cpt_dpt_cd char (2)
    @cpt_com_cd char (3)
    @sub_com_cd char (5)
    @con_upc_no char (13)
    , @pid_lng_dsc_tx varchar (100)
    , @pid_sht_dsc_tx varchar (100)
    , @rev_by varchar (8)
    @rev_dt datetime


    DECLARE upc_cursor CURSOR FOR
    SELECT *.
    OF di_audit_corp_upc_ldr_tbl
    WHERE con_upc_no IN ((in English only)
    SELECT con_upc_no, COUNT (*)
    TABLE [dbo]. [di_audit_corp_upc_ldr_tbl]
    GROUP BY con_upc_no
    HAVING COUNT (*) > 1
    )
    ORDER BY con_upc_no

    OPEN upc_cursor

    -It is performed while the previous extraction is successful.
    FETCH NEXT from upc_cursor
    IN
    @cpt_dpt_cd
    @cpt_com_cd
    @sub_com_cd
    @con_upc_no
    @pid_lng_dsc_tx
    @pid_sht_dsc_tx
    @rev_by
    @rev_dt

    -Check @FETCH_STATUS to see if he has more lines to fetch.
    WHILE @FETCH_STATUS = 0
    BEGIN
    -If not exists
    IF NOT EXISTS)
    SELECT con_upc_no
    OF dbo.di_audit_corp_upc_tbl
    WHERE con_upc_no = @con_upc_no
    )
    BEGIN
    -Insert record
    PRINT "insert UPC: ' + @con_upc_no"

    INSERT INTO dbo.di_audit_corp_upc_tbl)
    rcp_dpt_cd
    cpt_dpt_cd
    cpt_com_cd
    sub_com_cd
    cas_upc_no
    con_upc_no
    con_upc_tx
    pid_lng_dsc_tx
    pid_sht_dsc_tx
    aut_vld_cd
    rev_by
    rev_dt
    ) (VALUES
    '07'
    @cpt_dpt_cd
    @cpt_com_cd
    @sub_com_cd
    '0000000000000'
    @con_upc_no
    @pid_lng_dsc_tx
    @pid_lng_dsc_tx
    @pid_sht_dsc_tx
    , 'N'
    @rev_by
    @rev_dt
    )
    END
    ON THE OTHER


    BEGIN
    -to jump
    PRINT ' UPC to jump: "+ @con_upc_no
    END
    < cftransaction action = "commit" / >
    -It is performed while the previous extraction is successful.
    FETCH NEXT from upc_cursor
    IN
    @cpt_dpt_cd
    @cpt_com_cd
    @sub_com_cd
    @con_upc_no
    @pid_lng_dsc_tx
    @pid_sht_dsc_tx
    @rev_by
    @rev_dt

    END

    CLOSE Upc_cursor
    DEALLOCATE upc_cursor

    If I understand your SQL code you select some records in the di_audit_corp_upc_ldr_tbl table.  For each record in the results, you insert di_audit_corp_upc_tbl if a matching record does not already exist in di_audit_corp_upc_tbl.  If this summary is correct, you could try rewriting your query to avoid using a cursor.

    Something like the example below might work (I have not tested this code).

    INSERT di_audit_corp_upc_tbl (rcp_dpt_cd, cpt_dpt_cd, cpt_com_cd, sub_com_cd, cas_upc_no, con_upc_no, con_upc_tx, pid_lng_dsc_tx, pid_sht_dsc_tx, aut_vld_cd, rev_by, rev_dt)
    SELECT ' 07', cpt_dpt_cd, cpt_com_cd, sub_com_cd, ' 0000000000000', con_upc_no, pid_lng_dsc_tx, pid_lng_dsc_tx, pid_sht_dsc_tx, "n", rev_by, rev_dt
    From di_audit_corp_upc_ldr_tbl
    WHERE THERE IS NO
    (
    SELECT *.
    OF di_audit_corp_upc_tbl AS B
    WHERE B.con_upc_no = A.con_upc_no
    ) - check to see if the folder already exists in the destination table
       
    AND
    (
    SELECT COUNT (*)
    FROM di_audit_corp_upc_ldr_tbl AS C
    WHERE C.con_upc_no = A.con_upc_no
    ) > 1 - replaces the HAVING clause in the original query used to select cursor

    Note that I assume you are using Microsoft SQL Server.

    For questions about the improvement of SQL queries you could be better off the coast to post this kind of question on a specific forum for the database server you are using.

Maybe you are looking for

  • Logic Pro - mixture with 1 track in the Red?

    HI folks, I'm just learn to mix and have my song sitting close to the way I like it, I kept all not too high and have used EQ on most of the tracks in my mixture to eliminate some UM and stop the instruments to be buried, however I have noticed that

  • Droid Razr XT912 NO NOTIFICATION ON MY PHONE

  • a licence - MS Visual studio 2015

    Hello If I buy a license for MS Visual studio 2015, will it work with SQL Server 2008? If this will not work, can I change the license for Visual studio 2013 or Visual studio 2010? Thanks for your reply. -M

  • Sudden Lagginess / be minced, after a year of no problem

    We thank you for taking a minute of your time and the search/display on my problem. I am in desperate need of fixing this sudden ground being. OK, so I've had my computer for about a year now (get inside) and it handled like a dream. All of a sudden

  • Windows Search 4.0 is not installed

    I have an XP SP3 machine. I added the machine to a network, but since then, Windows Search does not work. The search indexer continues running & report errors. I tried to remove find and reinstall, but the reinstallation fails. Would really like to u