the command - stored procedure support

Hi all

I'm having a lot of trouble getting my head around an update command / stored procedure, I took out all my books and has spent the last two days on Google which has aggravated my confusion. In simple terms what I try to do is to update a field in a table with the ordered there, but according to certain criteria. So my table contains the fields - following

JBAID
JBASiteID
JBADatePosted
JBAPostFor
JBANotified

What I want to do is to update the value of the JBANotified field for all records that meet the following requirements for Y

The criterion is-

WHERE the DATEADD(d,JBAPostFor,JBADatePosted) BETWEEN DATEADD (d,-7, GETDATE() AND GETDATE() AND JBANotified = ' AND JBASiteID = MMColParam n (where MMColParam is Session("SITEID")))

So I just tried to build a command procedure / stored - which reads (see attached code) (more than probably all bad)

I can't get my head around things-

First rethink code in the first place, execution of the command on the loading of the page and then when the command run the redirection to the next page.

I would really appreciate help with this-

Thank you all

Do you use the CS3 with ASP/VBScript? There is a bug in the implementation of the order which has this broken feature.

I asked about it in this forum several months ago, but now I can't find my original post, but I found another post that talks about the same thing: http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=12&catid=263&threadid = 1281539 & enterthread = y

My solution is to fall back to DW8 for the edition of the command, but use CS3 for the rest. I don't know what you're supposed to do if you do not have a previous version.

It seems that your sql is correct, but the bug prevents the second block of code updated with the correct values.

I hope that a solution is coming...

Tags: Dreamweaver

Similar Questions

  • SSL mutual authentication using the Oracle stored procedure

    Hello

    DB version:
    Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production

    Is possible to perform mutual authentication SSL uses the Oracle stored procedure?
    I read articles and forums saying that it is not a good approach to call the Web service using the Oracle procedure (and I don't know if it's even possible authentication using procs). But I would like to know if it's possible and how.

    In other is words there a way to incorporate the client certificate information into a procedure that calls a Web service.

    I read the articles to do it in JAVA or .net. But please advice how we can achieve using Oracle procedures.

    Thank you.

    934451 wrote:

    Is possible to perform mutual authentication SSL uses the Oracle stored procedure?

    To learn more. SSL what for?

    Oracle PL/SQL only supports client standard TCP sockets. However, interface for HTTP, Oracle PL/SQL also supports HTTPS - which requires the certificates of authentication of the server to be stored in a portfolio of Oracle web and used during the transmission via HTTPS. See the code example {message identifier: = 1925297} for more details.

    I read articles and forums saying that it is not a good approach to call the Web service using the Oracle procedure (and I don't know if it's even possible authentication using procs).

    Forums and articles written by idiots. For idiots.

    And no, I'm not to embellish my response to this pitch that you met. It is false. It is written by ignorant people who don't know ANYTHING about the use of Oracle and PL/SQL. And feel free to forward my response to these idiots. They find me here if they want to argue...

    As an example of how to call a web service, see {message identifier: = 10158148} and {message: id = 10448611}.

  • Apex. Submit-> process to run one of the two stored procedures on page

    version: 4.2.5

    page one region: form on the stored procedure

    region of page two: form on the stored procedure

    The region button 'submit' for the region page 2:

    ACTION: Redirect URL

    Run Validations: YES

    Target URL: javascript:apex.submit ('CALL_MY_PROC');

    'Treatments' execute the stored procedure

    Point process: submit now - after calculations and Validations

    Enforcement process: once a Page visit (by default)

    ...

    Conditions

    When you press the button:-no Condition button

    Condition type: request = Expression 1

    Expression 1: REQUEST = CALL_MY_PROC

    The expected behavior is to call the stored procedure in the region on two page without invoking the other stored procedure.  Separation of concerns is desired, this button sends the form this proc, this button argues that form to this proc.  Nor should call each other, so to speak.

    The stored procedure is not called when I click 'Submit' (button from region to region page two).  How can I solve this?

    Thanks in advance for any guidance.

    -abe

    Solution: the status... are not REQUEST =

    -abe

  • Re: "insufficient privileges" error when you run the Java stored procedure in another schema

    I get an "insufficient privileges" error when you run the Java stored procedure in another schema, see details below.  I don't know what are missing privileges (I already granted the EXECUTE privilege), suggestions?  -Thank you.

    Define a simple java class and deploy it as a Java stored procedure to test:


    Schema: User1

    test of the package;

    public class HelloWorld {}

    public HelloWorld() {

    Super();

    }

    public static String Hello () {}

    Return "HELLO";

    }

    }

    CREATE or REPLACE FUNCTION HELLO RETURN VARCHAR2 AUTHID CURRENT_USER AS LANGUAGE JAVA NAME ' test. HelloWorld.hello () return java.lang.String';

    Grant execute on USER2 HELLO

    Test the Java stored procedure through the PL/SQL function call (in the same schema):


    Schema: User1

    SET SERVEROUTPUT ON

    DECLARE

    v_Return VARCHAR2 (200);

    BEGIN

    v_Return: = User1. HELLO;

    DBMS_OUTPUT. Put_line ('v_Return =' | v_Return);

    END;

    anonymous block filled

    v_Return = HELLO

    Test the Java stored procedure through the PL/SQL function call in a different pattern:


    Schema: USER2

    SET SERVEROUTPUT ON

    DECLARE

    v_Return VARCHAR2 (200);

    BEGIN

    v_Return: = User1. HELLO;

    DBMS_OUTPUT. Put_line ('v_Return =' | v_Return);

    END;

    Error report-

    ORA-01031: insufficient privileges

    ORA-06512: at "User1." HELLO', line 1

    ORA-06512: at line 4 level

    01031 00000 - "insufficient privileges".

    * Cause: An attempt was made to change the user name or password

    without the privilege appropriate. This error also occurs if

    trying to install a database without the need for employment

    access privileges.

    When Trusted Oracle is configure in DBMS MAC, this error may occur

    If the user has been granted the privilege necessary for a higher label

    that the connection is active.

    * Action: Ask the database to perform the operation or grant administrator

    the required privileges.

    For users Trusted Oracle get this error, well that granted the

    the privilege that is suitable for the top label, ask the database

    administrator to grant the privilege to the appropriate label.

    You have created the function with AUTHID CURRENT_USER, which means that the function is executed with the rights of the applicant (but not with the rights of the author). This means that the applicant must have grants (directly or through roles) on all used/accessible objects in the service. In your case the user USER2 has not granted with EXECUTE on the class/source Java test. Class HelloWorld, causing the ORA-01031 exception. You create service without AUTHID CURRENT_USER (i.e. with AUTHID DEFINE, which is by default, if you do not have a specific reason to use AUTHID CURRENT_USER) or grant EXECUTE on JAVA test SOURCE. Class HelloWorld to User2.

    Dimitar

  • Use the utilities from the Oracle stored procedure

    Hi all

    I use Oracle Import to load the data from .dmp file to Oracle table.

    Test/test leader IMP = Data .dmp fromuser = user1 touser = test tables = emp

    But my requirement is to create a stored procedure that will import data into the table and identify the number of loaded records and how impossible to import.

    Can I keep inside the procedure import statement?

    Thank you.

    No, not possible.

    IMP is an exe like sql more who can evoke to the command prompt.

    If you need all the actions on the imported... table export for example/test table, and then go further.

  • 34xx/35xx version of the command 'show technical support '.

    Recently started a new job and have different models PowerConnect, that I manage on my 6248 I've been able to use the command "Show support", but that does not work on my 35xx or 34xx series switches. Y at - it equivalent command? I tried to look in the manual, but was not able to find what I'm looking for.

    On these switches, you will need to be more specific with the show commands. You can use # poster?, to see what commands are available.

    The most used most frequent are:

    # show running-config

    # See the version

    # show vlan

    # See the spanning tree

    # display arp

    The CLI guides can help provide additional information about each show command.

    http://Dell.to/1RnTNbd

    http://Dell.to/1QERcwG

    Hope you find it useful.

  • Mutex in the oracle stored procedure... How to get there?

    Hello

    I have the series of insert/update statements in an oracle stored procedure. The stored procedure is called composite Oracle SOA.

    The procedure works like this:

    a. download a request and checks to see if the file is already in the database. If she's here, we update, elsewhere insert.

    b. that I check for 10 tables and make the necessary inserts/updations.

    But sometimes, when I get the huge volume of transactions in the stored procedure, I see this violation of unique constraint violated due to lack of appropriate controls to ensure that no other parallel forum is trying to update the same record.

    How to do this so that no two execution of stored procedure doesn't work on the same record in the same table?

    Thank you!!

    Hello

    you might consider something like this

    create table t1(
      id number primary key,
      action varchar2(10),
      who varchar2(10)
    )
    ;
    
    declare
      p_id number           := 1;
      p_action varchar2(10) := 'Insert';
      p_who varchar2(9)     := 'Session 1';
      --
      procedure update_t1(p_id number, p_action varchar2, p_who varchar2) is
      begin
        update t1 set action = p_action, who = p_who where id = p_id;
      end;
    begin
      -- try to insert or update row for PK p_id
      merge into t1 d using (
        select
          p_id     id,
          p_action action,
          p_who    who
        from dual
      ) s on (d.id = s.id)
      when matched then
        update set d.action = 'Update', d.who = s.who
      when not matched then
        insert values (s.id, s.action, s.who)
      ;
    exception when dup_val_on_index then
      -- insert is no option, update when lock is released
      update_t1(p_id, 'Update', p_who);
    end;
    /
    
    drop table t1 purge
    ;
    

    Scenario (two sessions trying to insert/updated updated for id 1):

    session 1 inserts ("1" "insert" "Session 1") and the data is not visible to the session 2

    session 2 inserts same id but crashes because of the locking session 1

    validation of the session 1

    session 2 insert fails but who manages updating instead

    session 2 commits, values for the id 1 is now ('1' 'Update' "Session 2")

  • Pass an array of bytes to the oracle stored procedure

    I have a problem with moving from byte array in Oracle stored procedure as an input parameter by using odp.net.

    Here is the signature of the stored procedure:

    SOMEPROCEDURE(session IN NUMBER, data IN RAW)

    Here is c# code, which calls the procedure:

    var cmd = new OracleCommand("SOME_PROCEDURE", _connection);

    cmd.CommandType = CommandType.StoredProcedure;

    var bt = new byte[]{1,68,0,83,128,1};

    OracleParameter sessionId = new OracleParameter("dbSessionId", OracleDbType.Decimal, new OracleDecimal(_dbSessionId), ParameterDirection.Input);

    OracleParameter data = new OracleParameter("statusData", OracleDbType.Raw, new OracleBinary(bt), ParameterDirection.Input);

    cmd.Parameters.Add(sessionId);

    cmd.Parameters.Add(data);

    cmd.ExecuteNonQuery();

    This code does not (stored procedure throws exception, which cannot receive), because in byte array hadou number 128!, if I display 128 on another number, minus 128, it works great!

    What should I do?

    After some tests I found the solution. Initially, you cannot switch to the array of bytes via the odp.net stored procedure, if the table contains 127 large values.

    Yes, solution: 1. create the wrapper procedure

    procedure SOME_PROCEDURE_WRAPPER (p_session_id in number, p_data  in varchar2)
     is v_data raw(1024);
     rawdata raw(1024); 
     rawlen number;
     hex varchar2(32760);
     i number;
     begin
      rawlen := length(p_data);
      i := 1;
      while i <= rawlen-1
      loop 
     hex := substrb(p_data,i,2); 
         rawdata := rawdata || HEXTORAW(hex); 
         i := i + 2; end loop; 
         SOME_PROCEDURE(p_session_id , rawdata); 
     end;
    

    2 then need to modify the code c# in this way:

     var cmd = new OracleCommand("SOME_PROCEDURE_WRAPPER", _connection);
     cmd.CommandType = CommandType.StoredProcedure;
     string @string = statusData.ToHexString();
     OracleParameter sessionId = new OracleParameter("dbSessionId", OracleDbType.Decimal, new OracleDecimal(_dbSessionId), ParameterDirection.Input);
     OracleParameter data = new OracleParameter("statusData", OracleDbType.Varchar2,@string.Length, new OracleString(@string), ParameterDirection.Input);
     cmd.Parameters.Add(sessionId);
     cmd.Parameters.Add(data);
     cmd.ExecuteNonQuery();
    

    where

    public static string ToHexString(this byte[] bytes)
     { 
         if(bytes == null || bytes.Length == null)
               return string.Empty;
          StringBuilder hexStringBuilder = new StringBuilder();
          foreach (byte @byte in bytes)
          { 
              hexStringBuilder.Append(@byte.ToString("X2")); 
          } 
          return hexStringBuilder.ToString();
     }
    
  • Run the oracle stored procedure in CF8

    I'm running a procedure like this.

    < cfstoredproc procedure = "GetAction" datasource = "test_DSN" >
    < cfsqltype cfprocparam dbvarname "actionId" = "CF_SQL_INTEGER" = type = "en" value = "1" >
    < name cfprocresult = resultset 'actions' = '1' >
    < / cfstoredproc >

    and my stored procedure in oracle.

    create or replace function GetAction (actionId IN ACTION.ID%TYPE)

    OPERATION RETURN % ROWTYPE

    IS
    actions

    ACTION % ROWTYPE;

    Start

    Select *.

    IN actions

    Action WHERE ID = actionId.

    RETURN operations;

    GetAction end;

    then I get the error message like:
    ORA-01008: not all variables

    Please help me on this.

    Thanx

    If you want to return a result set (result of a query) of your PL/SQL, you will have to do what Daverms suggested and your function to convert a procedure and a cursor reference to return your result set. Your procedure should be contained in a package so that you can declare a ref cursor "globally" to make it accessible by CF.

    Oh, and don't forget to change your parameter for cfstoredproc procedure to add the name of the package for the proc name.

    Phil

  • How to access the xml stored procedure clob?

    Hello
    I am producing what appears to be a simple bit of code (just a simple report in the form of a web page), while what I've tried so far only does not work. I come back kind of clob broken by the stored procedure, so I feel it's almost right, but who knows at this point. TIA

    Here is an excerpt from Oracle:

    -p_XMLReport ON CLOB,
    -qryCtx DBMS_XMLGEN.ctxHandle;
    -sql_stmt VARCHAR2 (32767).

    qryCtx: = DBMS_XMLGEN.newContext (sql_stmt);
    p_XMLReport: = DBMS_XMLGEN.getXML (qryCtx);

    Here's a snippet of VB:

    Conn = New OracleConnection
    Dim cmd As New OracleCommand
    Dim rs As OracleDataReader
    Try
    Connection group conn cmd.
    Conn. Open()
    cmd.CommandText = "GETDATA".
    cmd.CommandType = CommandType.StoredProcedure
    cmd. Parameters.Add (New OracleParameter ("p_XMLReport", OracleDbType.Clob)). Direction = ParameterDirection.Output
    cmd. Parameters.Add (New OracleParameter ("p_Conditions", OracleDbType.Clob)). Value = "'" + conditions + "'."
    cmd. Parameters.Add (New OracleParameter ("p_Fields", OracleDbType.Clob)). Value = "'" + fields + "'."
    RS = cmd. ExecuteReader()
    xmlDoc = New XmlDocument
    CLOB Dim As String
    CLOB = (cmd. Parameters ("p_XMLReport"). (Value). Value ' kind of work...
    Response.Write ("< pre >")
    Response.Write (clob)

    Usually you would call ExecuteReader only if you use a query or a proc that returns a ref cursor

    See if that helps,
    Greg

    /*
    create or replace procedure getxmlclob(v1 out clob) as
    qryCtx DBMS_XMLGEN.ctxHandle;
    sql_stmt VARCHAR2(32767);
    begin
    sql_stmt := 'select * from all_objects';
    qryCtx := DBMS_XMLGEN.newContext (sql_stmt);
    v1 := DBMS_XMLGEN.getXML(qryCtx);
    end;
    /
    */
    using System;
    using System.Data;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    
    class Program
    {
        static void Main(string[] args)
        {
            using (OracleConnection con = new OracleConnection("user id=scott;password=tiger;data source=orcl"))
            {
                con.Open();
                using (OracleCommand cmd = new OracleCommand("", con))
                {
                    cmd.CommandText = "getxmlclob";
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.Add("foo", OracleDbType.Clob, ParameterDirection.Output);
                    cmd.ExecuteNonQuery();
                    Console.WriteLine(((OracleClob)cmd.Parameters["foo"].Value).Value.ToString());
                }
            }
        }
    }
    
  • Help the Oracle stored procedure

    I call result4 front end and itranno now, I want to call from back end that wt i hv 2 do.
    I want to find the Maximum iTranno of this profilebasicdetail

    Create or replace procedure Insert_profilebasicdetail(result1 in NUMBER,result in NUMBER,*result4* in)

    NUMBER)
    As
    v_IncKeyID NUMBER;
    v_tempkeyId NUMBER;

    CURSOR TempInsert IS
    SELECT ikeyid, iprofileid, iquestionid, vquestionans, cstatusindi, dmodifyon, imodifyby, iyear, isubprofileid
    OF profilebasicdetail
    WHERE isubprofileid = result and itranno = * result4 *;

    BEGIN

    SELECT MAX (NVL(iKeyID,0))
    IN v_IncKeyID
    OF profilebasicdetail;

    FOR r in TempInsert LOOP
    v_IncKeyID: = v_IncKeyID + 1;
    Insert into profilebasicdetail
    (ikeyid, iprofileid, iquestionid, vquestionans, cstatusindi, dmodifyon, imodifyby, itranno, iyear, isubprofileid)
    Select v_IncKeyID, r.iprofileid, r.iquestionid, r.vquestionans,
    r.cstatusindi, r.dmodifyon, r.imodifyby, 1.
    r.iYear, result1
    of profilebasicdetail
    where ikeyId = r.ikeyId;
    END LOOP;

    EXCEPTION
    WHILE others THEN
    lift;
    End;

    Hello

    Create or replace procedure Insert_profilebasicdetail(result1 in NUMBER,result in NUMBER,result4 in)

    NUMBER)
    As
    v_IncKeyID NUMBER;
    v_tempkeyId NUMBER;

    CURSOR TempInsert IS
    SELECT ikeyid, iprofileid, iquestionid, vquestionans, cstatusindi, dmodifyon, imodifyby, iyear, isubprofileid
    OF profilebasicdetail
    WHERE isubprofileid = result and itranno = (select max (itranno)
    of profilebasicdetail);

    BEGIN

    SELECT MAX (NVL(iKeyID,0))
    IN v_IncKeyID
    OF profilebasicdetail;

    FOR r in TempInsert LOOP
    v_IncKeyID: = v_IncKeyID + 1;
    Insert into profilebasicdetail
    (ikeyid, iprofileid, iquestionid, vquestionans, cstatusindi, dmodifyon, imodifyby, itranno, iyear, isubprofileid)
    Select v_IncKeyID, r.iprofileid, r.iquestionid, r.vquestionans,
    r.cstatusindi, r.dmodifyon, r.imodifyby, 1.
    r.iYear, result1
    of profilebasicdetail
    where ikeyId = r.ikeyId;
    END LOOP;

    -Maximum Tranno
    Select max (itranno)
    in result4
    of profilebasicdetail;

    EXCEPTION
    WHILE others THEN
    lift;
    End;

    -Pavan Kumar N

  • Execution of procedure stored from the command prompt?

    Is there a way to the execude stored procedure in Windows command prompt, something like running script sql using sqlplus.exe username/password@db @sql_script. *. I am aware of the possibility to set the pl/sql block that calls the procedure in the script and then call the script, but this isn't the solution, what I'm looking for.

    Something like that?

    C:\Documents and Settings\Administrator>echo execute del_emp|sqlplus hr/hr
    
    SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jun 14 19:13:52 2010
    
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    
    SQL>
    PL/SQL procedure successfully completed.
    
    SQL> Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 -
    Production
    
  • Error in retrieving the stored procedure of the DB JDev adapter

    Hello
    I am facing a problem when configuring Jdeveloper stored procedures using the DB adapter. I use in my Sql Server 2005 database, version Jdeveloper 10.1.3.3 Version 10.1.3.1.Bpel. Connection to the database SQL Server 2005 is good, but it only displays the views and tables. I get the following error message when I try to add the sql stored procedure call
    "An error occurred while getting the database schemas. Make sure the database connection is valid and is supported"

    Can someone help me please.

    Thank you
    Phani

    Published by: Brad on October 28, 2008 11:30

    Post your email and I'll send you a complete tutorial of SQL Server.

  • Unexpected token: the error that occur inside a stored procedure

    I get an unexpected token error when you try to compile the following stored procedure. The error occurs on the run pk_proof.pr_ProofAssets inside the stored procedure exec statement. No reason?
    CREATE OR REPLACE PROCEDURE MONTHLY_ASSET (ln_business_dt_num IN NUMBER DEFAULT NULL,
                                               missing_tbl_name OUT NOCOPY VARCHAR2) 
    IS
       ln_business_dt_num NUMBER;
       missing_tbl_name VARCHAR2;
       no_tbl_name_found EXCEPTION;
       bad_date_value EXCEPTION;
       counts_not_matched EXCEPTION;
     BEGIN
       IF ln_business_dt_num < 0 THEN
       RAISE bad_date_value;
       ELSE
         Select MAX(business_dt_num) into ln_business_dt_num
         FROM sasor.dp_ca_proof;
          
       if missing_tbl_name IS NOT NULL then
          raise no_tbl_name_found;
       end if;
       
       exec pk_proof.pr_ProofAssets('SLH_DST_ASSET', ln_business_dt_num, 'sasor_batch');
     

    Remove 'exec '.

  • to find the location of PL/SQL, stored PROCEDURE in the database

    Hello

    This is the detail I have the executable of the Application Developer program simultaneous

    Executable NAPESCO_STAFF_LEDGER_DTLS

    Short name NPSTALEDDTLS

    Application of human resources

    Execution of PL/SQL, stored procedure method

    Name of file execution NAPESCO_STAFF_LEDGER_DTLS


    I would like to know how to view and change this procedure, where it is stored

    kindly help

    Hello

    This seems to be a custom package. To display the source of the simultaneous program ' PL/SQL Stored Procedure', please refer to (Note: 455582.1 - where can I get the whole "stored procedure" Pl/Sql Source file on the current program?).

    Thank you
    Hussein

Maybe you are looking for