Pass string array to Oracle function from Web page

Hi. I need to pass a two-dimensional array of string values to an Oracle function from an ASP.NET page. Is there an efficient way to accomplish this? I'm thinking I'll have to create a long string with special delimiters,
|12345^4.000|67890^3.670|.....
I'd parse the string on Oracle and break it into its component parts. In this example, each "record" is separated by the bar "|" and each field is separated by the up arrow "^". So each record has two fields.
Is this a good approach? Your input is much appreciated. Thanks.

In PL/SQL, it is easy enough to define a record type with two attributes and declare a store procedure that takes in an array of those parameters. I know that from Java it is possible to create and pass in such an array. I would suspect that the same is possible from .Net but I am not a competent .Net developer.
Justin

Similar Messages

  • How to pass an array to a function from a SELECT statement

    Hi all. I have a problem with passing an array to a function directly from a SELECT statement.
    Here is what I want. If I have a function
    function AAA(arrayVar <ArrayType>) return number;
    I want to be able to call this function this way
    select AAA((2,3,4))
    from dual
    or this way
    select AAA((10,12))
    from dual
    In other words I want to be able to pass an arbitrary number of numbers to the function. And I want this to work in a SELECT statement.
    Does anyone have any ideas how to implement this? What <ArrayType> should I use?(I've read about VARRAY, nested tables in the Oracle documentation but as far as I've understood these array types are meant to be used within PL/SQL blocks).
    I found only this http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:208012348074 through Google but it didn't help me.
    Thank you in advance.

    > What <ArrayType> should I use?
    SQL data types - as 3360 showed above. You cannot use PL/SQL structures and user types in the SQL Engine.
    You can however use all SQL structures and types in PL/SQL.
    Arrays in SQL is created as collection type - basic o-o. The collection type (or class) serve as a container for instantiated objects or scalar type.
    This is covered in detail in [url http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14260/toc.htm]
    Oracle® Database Application Developer's Guide - Object-Relational Features

  • Calling Oracle Reports from WEB Pages(JSP)

    We are using Weblogic as the web server, Oracle 8i as the database and JSP(Java Server Pages) as the scripting language.
    We need reports to be invoked and displayed to the browser. Is it possible to invoke Oracle Reports 6i reports from JSP WEB pages and display the output to the browser? How can we do this and what are the additional s/w requirements, if any?
    null

    yes it is possible. There is a cgi script called viewreport.cgi. Have the jsp page call it (GET or POST method) and place the user parameters inside the form.

  • Can I invoke Oracle Form from web page?

    Does anyone know how can I invoke an Oracle Forms form from an html page?

    Hi Hans
    That's what I thought re the url but I can't find out what it is, it briefly appears in the browser but then goes leaving me with the formsweb.cfg config url. I am running from the Builder on Windows 2000 and it's Forms 10g.
    Marc

  • Example of passing String Array from java to C using JNI

    hi all
    i searched net for passing string array from java to C but i dont get anything relevent
    i have
    class stu
    int rollno
    string name
    String [] sub
    i want to pass all as String array from java to C and access it C side

    1. Code it as though it were being passed to another method written in java.
    2. Redefine the method implementation to say "native".
    3. Run jnih to generate a C ".h" file. You will see that the string array
    is passed into C as a jobject, which can be cast to a JNI array.
    4. Write the C code to implement the method and meet the interface
    in the generated .h file.

  • Problem calling Oracle function from Access 2007 / ADO

    Hopefully, I'm posting this in the correct forum. I'm also posting on an Access forum as I'm not entirely sure where the issue lies.
    I'm calling an Oracle function from Access 2007 using an ADO Command object.
    The function takes three input parameters and has a return value and an output parameter. The output parameter is a BLOB, and the return value is varchar2 (either "T" or "N") based on the outcome of the function.
    If I pass correct values to the function, I get the following error message (errs out on the command.execute line):
    Run-time error '-2147467259 (80004005)':
    [Oracle][ODBC][Ora]ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at line 1
    Here's the function:
    FUNCTION GET_ITEMREV_ATTACH(P_ORGANIZATION_ID IN NUMBER,
    P_INVENTORY_ITEM_ID IN NUMBER,
    P_REVISION IN VARCHAR2,
    X_DRAWING OUT BLOB) RETURN VARCHAR2 IS
    RESULT VARCHAR2(1);
    BEGIN
    RESULT := 'T';
    BEGIN
    SELECT L.FILE_DATA
    INTO X_DRAWING
    FROM FND_ATTACHED_DOCUMENTS AD,
    MTL_ITEM_REVISIONS_B IR,
    FND_DOCUMENTS_TL D,
    FND_LOBS L
    WHERE AD.ENTITY_NAME = 'MTL_ITEM_REVISIONS' AND
    AD.PK1_VALUE = IR.ORGANIZATION_ID AND
    AD.PK2_VALUE = IR.INVENTORY_ITEM_ID AND
    AD.PK3_VALUE = IR.REVISION_ID AND
    AD.CATEGORY_ID = 1001216 AND
    D.DOCUMENT_ID = AD.DOCUMENT_ID AND
    D.LANGUAGE = 'US' AND
    L.FILE_ID = D.MEDIA_ID AND
    IR.ORGANIZATION_ID = P_ORGANIZATION_ID AND
    IR.INVENTORY_ITEM_ID = P_INVENTORY_ITEM_ID AND
    IR.REVISION = P_REVISION;
    EXCEPTION
    WHEN OTHERS THEN
    RESULT := 'N';
    END;
    RETURN(RESULT);
    END GET_ITEMREV_ATTACH;
    Here's the VB code I'm using to call the function:
    Private Sub Command8_Click()
    Dim CMD As New ADODB.Command
    Dim conn As ADODB.Connection
    Dim Param1 As ADODB.Parameter
    Dim Param2 As ADODB.Parameter
    Dim Param3 As ADODB.Parameter
    Dim ParamBlob As ADODB.Parameter
    Dim ParamReturn As ADODB.Parameter
    Set conn = New ADODB.Connection
    With conn
    .ConnectionString = "Driver={Oracle in OraHome92};Dbq=OAPLY;UID=***;PWD=*******"
    .CursorLocation = adUseClient
    .Open
    End With
    Set CMD = New ADODB.Command
    Set CMD.ActiveConnection = conn
    CMD.CommandText = "immi_attach_pub.get_itemrev_attach"
    CMD.CommandType = adCmdStoredProc
    Set ParamReturn = CMD.CreateParameter("RESULT", adVarChar, adParamReturnValue, 1)
    CMD.Parameters.Append ParamReturn
    Set Param1 = CMD.CreateParameter("P_ORGANIZATION_ID", adInteger, adParamInput, 1, 6)
    CMD.Parameters.Append Param1
    Set Param2 = CMD.CreateParameter("P_INVENTORY_ITEM_ID", adInteger, adParamInput, 4, 5207)
    CMD.Parameters.Append Param2
    Set Param3 = CMD.CreateParameter("P_REVISION", adVarChar, adParamInput, 2, "04")
    CMD.Parameters.Append Param3
    Set ParamBlob = CMD.CreateParameter("X_DRAWING", adLongVarBinary, adParamOutput, 200000)
    CMD.Parameters.Append ParamBlob
    CMD.Execute , , adExecuteNoRecords *** this is where the error occurs
    conn.Close
    MsgBox CMD.Parameters("RESULT")
    End Sub
    I've tried using different data types for the varchar2 parameters (adVarChar, adBSTR, adChar) with no difference.
    If I pass a bogus value for Param3...."'04'"...the function returns "N" indicating that it actually executed something. But, when I pass the correct value "04", it returns the above mentioned error.
    I can execute the function in PL/SQL just fine, so I'm thinking there's something wrong with the parameters, datatype, or other definitions on the Access side.
    Does anyone have any thoughts? I'm at a dead end with this. Sorry for the long post. Thank you.

    I tried your code with 11107 ODBC/client/database (but with a NULL output blob for convenience sake) and got no errors.
    If you're using 92 ODBC/client, you may want to try upgrading to something more current, or at least getting the latest patch(9208) to see if that helps. Since it works for me I'm guessing it may be a resolved bug in that version.
    Hope it helps,
    Greg

  • Passing Parameter from Web Page to Form 6i

    Dear All,
    We are using 9i AS with Form 6i. I want to created a web page for user login and called my application By passing value
    window.open("http://hrtest/dev60cgi/ifcgi60.exe?form=login_form.fmx&width=1000&height=700&
    userid=logme/logme1@test","","width=1000,height=700,top=0,left=0,location=no,directories=no,
    status=no,menubar=no,toolbar=no,maximize=yes,resizable=yes")
    and it successfully run.
    I want to pass additional parameter to my login_form.fmx from web page like User Shift entered by user on logon ?
    Please help me out.
    Regards,
    Khurram

    I got the clue
    pass parameter in your UR
    as
    //hrtest/dev60cgi/ifcgi60.exe?form=LOGIN_FORM_Para.fmx&width=1000&height=700&userid=power/power1@hrtest&otherparams=PAKISTAN=ALLAH"
    Define a :PARAMETER.PAKISTAN on Form
    and write following trigger
    BEGIN
    if :PARAMETER.PAKISTAN = 'ALLAH' then
    message('ALLAH HO AKBAR');
    message('ALLAH HO AKBAR');
    message(:PARAMETER.PAKISTAN||' HO AKBAR');
    message(:PARAMETER.PAKISTAN||' HO AKBAR');
    else
    message('INSH'||:PARAMETER.PAKISTAN);
    message('INSH'||:PARAMETER.PAKISTAN);
    end if;
    END;
    Regards
    Khurram Altaf | Assistant Manager ERP
    Enterprise Resource Planning Department
    Kohinoor Textiles Mills Ltd
    Peshawar Road, Rawalpindi.
    +92.51.5473940-44 ext 250 | +92.333.5256626
    e-mail: [email protected] | web: www.kmlg.com

  • Call Oracle function from Stored Procedure

    Hi,
    I have function Which returning one number. I want to use that number in a procedure. How to call the Oracle Function from the Procedure
    Create procedure
    AS
    Begin
    Check number;
    Select Function1 into check from dual;
    It is giving error.
    Can anyone provide me example for this.
    Thanks in advance

    Put the Check Number; before begin
    SQL> create or replace procedure abc as
      2 begin
    3 val number;
      4  select abcd into val from dual;
      5  dbms_output.put_line(val);
      6  end;
      7  /
    Warning: Procedure created with compilation errors.
    Elapsed: 00:00:00.00
    SQL> show error
    Errors for PROCEDURE ABC:
    LINE/COL ERROR
    3/5      PLS-00103: Encountered the symbol "NUMBER" when expecting one of
             the following:
             := . ( @ % ;
             The symbol ":=" was substituted for "NUMBER" to continue.
    SQL> create or replace procedure abc as
      2 val number;
    3 begin
      4  select abcd into val from dual;
      5  dbms_output.put_line(val);
      6  end;
      7  /
    Procedure created.
    Elapsed: 00:00:00.00
    SQL> exec abc;
    100.22
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00
    SQL>

  • Oracle CODE Submission Web Page - MAKE IT WORK  finally ( not temporary! )

    Is it possible to finally FIX Oracle Code Submission web page. Last year ( last half ) it return errors, same this time. Is any possible way to finally FIX it without anytime alert that it is not working or broken. As far as I understand that the place were we share our code/tips/ideas, not publish our friends or something like that. I think if we use it, then at least put warning prior than we try to submit. No conversations about re-type same code ( tip used SQL, new tip - SAME but using PL/SQL function ), but at least make it work.
    Thanks/Ilya

    Thanks, Olivier. That may help me in future and shows me where I can edit some of the HTML code (though I've no experience yet of even reading HTML or Javascript, let alone editing it!).
    The web page I'm trying to edit has a URL of https://....../sap/bc/gui/sap/its/bbpstart which fits your example but the templates under service BBPSTART seem to bear no resemblance to the screen I need. The code under services BBPSC01 and BBPSC02 looks more relevant but still doesn't refer to the screen input field that I'm looking to edit.
    Doing View Source on the web-page dumps the (very lengthy) generated code. Extracted from the header of that code-dump is...
    This page was created by the SAP Integrated ITS, WebAS: SRA, workprocess: 0
    Template: bbpsc02/99/saplbbp_sc_ui_its_2000.html
    Does that point me to the actual editable source?
    (I am using SE80 in the SRA system.)
    I wrote the above on 3rd Jan but was unable to post it.
    Since then I have found template SAPLBBP_SC_UI_ITS 2000 in service BBPSC01 does bear a resemblance to the displayed page code but as a scanty framework. The generated code has vastly more lines. I can't yet see how the template becomes the web page and where all the addditional lines of code come from and are edited.

  • Create PDF from web page w/password

    Would like to created a PDF using the 'Create PDF from WEB Page' function. The initial page of the site requires a login which we have but we seem to be unable to use Acrobat to archive the site because it requires a login. Is there a way to login and create a pdf of the site?

    I tested this in Acrobat X and the exact same issue occurs
    http://www.quantumdynamix.net/clients/image-map-test/ImageMapTest-AcrobatX.pdf
    This has to be considered a legatimate bug, especially since IMAGE MAPS is listes as one of the supported HTML features via the help files

  • CS6: DistributedCOM Error id: 10016 when open pdf from web page in Win8.1

    For example here below I've got the issue: 
    http://modemwifi.it/wp-content/uploads/asus-dsl-n55u.pdf
    Adobe Acrobat X pro V 10.1.8:
    DistributedCOM Error id: 10016 when open pdf from web page.
    Nome registro: System
    Origine:       Microsoft-Windows-DistributedCOM
    Data:          04/11/2013 19:09:19
    ID evento:     10016
    Categoria attività:Nessuna
    Livello:       Errore
    Parole chiave: Classico
    Utente:        PC-PIERO\Piero
    Computer:      Pc-Piero
    Descrizione:
    Le impostazioni delle autorizzazioni impostazioni predefinite del computer non concedono l'autorizzazione di Attivazione in Locale per l'applicazione server COM con CLSID
    {B801CA65-A1FC-11D0-85AD-444553540000}
    e APPID
    {2EAF0840-690A-101B-9CA8-9240CE2738AE}
    all'utente Pc-Piero\SID Piero (S-1-5-21-3453328585-262132574-2759341577-1001) dall'indirizzo LocalHost (tramite LRPC) in esecuzione nel SID del contenitore di applicazioni Non disponibile (S-1-15-2-1430448594-2639229838-973813799-439329657-1197984847-4069167804-1277922394). Per modificare tale autorizzazione di sicurezza, è possibile utilizzare lo strumento amministrativo Servizi componenti.
    XML evento:
    < Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Microsoft-Windows-DistributedCOM" Guid="{1B562E86-B7AA-4131-BADC-B6F3A001407E}" EventSourceName="DCOM" />
        <EventID Qualifiers="0">10016</EventID>
        <Version>0</Version>
        <Level>2</Level>
        <Task>0</Task>
        <Opcode>0</Opcode>
        <Keywords>0x8080000000000000</Keywords>
        <TimeCreated SystemTime="2013-11-04T18:09:19.468877700Z" />
        <EventRecordID>14806</EventRecordID>
        <Correlation />
        <Execution ProcessID="768" ThreadID="776" />
        <Channel>System</Channel>
        <Computer>Pc-Piero</Computer>
        <Security UserID="S-1-5-21-3453328585-262132574-2759341577-1001" />
      </System>
      <EventData>
        <Data Name="param1">impostazioni predefinite del computer</Data>
        <Data Name="param2">Locale</Data>
        <Data Name="param3">Attivazione</Data>
        <Data Name="param4">{B801CA65-A1FC-11D0-85AD-444553540000}</Data>
        <Data Name="param5">{2EAF0840-690A-101B-9CA8-9240CE2738AE}</Data>
        <Data Name="param6">Pc-Piero</Data>
        <Data Name="param7">Piero</Data>
        <Data Name="param8">S-1-5-21-3453328585-262132574-2759341577-1001</Data>
        <Data Name="param9">LocalHost (tramite LRPC)</Data>
        <Data Name="param10">Non disponibile</Data>
        <Data Name="param11">S-1-15-2-1430448594-2639229838-973813799-439329657-1197984847-4069167804-1 277922394</Data>
      </EventData>
    < /Event>
    How can I solve this problem?
    Thanks

    // I got this from an Action (I�m using Struts)
    java.sql.Blob file=(java.sql.Blob)request.getAttribute("PDFfile");
    String filename=(String)request.getAttribute("filename");
    try{
      int iLength = (int)(file.length());
      response.setHeader("Content-type", "application/pdf");   
      response.setHeader("Content-Disposition", "inline; filename=\""+filename+"\"");
      response.setHeader("Expires","0");
      response.setHeader("Cache-Control","must-revalidate, post-check=0, pre-check=0");
      response.setHeader("Pragma","public");
      response.setContentLength(iLength);
      ServletOutputStream os = response.getOutputStream();
      InputStream in = null;
      in = file.getBinaryStream();
      byte buff[] = new byte[1024];
      while (true) {
          int i = in.read(buff);
          if (i<0) break;      
          os.write(buff,0,i); 
      os.flush();
      os.close();
    } catch(Exception ex){
       out.println("Error while reading file : " + ex.getMessage());
    }and now it�s running !!! I�m not using response.setContentType(...) and I do this in response.setHeader("Content-type", "application/pdf"). And I use response.setHeader("Content-Disposition", "inline; filename=\""+filename+"\"") instead of response.setHeader("Content-Disposition", "attachment; filename=\""+filename+"\"");

  • Create from Web Page and Out Of Memory

    My machine is Windows XP Prof, 3+ GB of memory, 10's of GB of free hard drive space.
    I create a PDFs from HTML pages located on my local drive. I am not making a PDF from HTML pages served by a Web Server. They are not located on some network device.
    With Acrobat 7 Professional, I was able to create a PDF from HTML pages without any problem using the Create From Web Page menu option. It might have been slow, but it would predictably create a PDF. The final PDF might be as large as 72 or 130 MB.
    I recently upgraded to Acrobat Pro Extended version 9. When I make some small PDFs (4-5 thousand pages) it seems to work okay. However, if I make the full PDF (about 10-15 thousand pages), Acrobat produces an out of memory error.
    I have tried a number of things, but I still get the error. In the past I have had trouble like this with Acrobat 8 Prof on the Mac (but I don't remember an actual Out Of Memory message box).
    Is there some setting can change, or some procedure that I can get my work done. It appears to me to be a bug in Acrobat 9, but if I could get a workaround for now, I would greatly appreciate it.
    Thanks.

    Even though I an using the Create from Web Page function, I am accessing files which my company has produced. They are located on my local system. I am not accessing them via a web server.
    I can make a file with 1 level. I can make a file with a couple of thousand pages. Even 8400 pages. However, when I try to make a PDF of the full site Acrobat flakes out and dies. When it hits around 13,300 pages, it dies.
    The troubling thing for me is that I was able to do the same thing in Acrobat Pro 7. I made a file with almost 14,500 pages. Because of the way Acrobat must be installed in Windows, I can't easily go back to version 7. It is a real pain not to be able to do something in the "New and Improved" version that I was able to do in the "nasty old" version.
    It would be helpful if Acrobat had better logging and error logging facilities. Maybe there is one page that is hitting Acrobat's bug, and if I could eliminate or change that page I could continue, but there is no way of knowing (as far as I know).

  • I am no longer able to open or download most PDFs from web pages. I have the pop-up blocker turned off in Preferences.

    In recent months I have found that I am unable to download or open PDF documents from web pages. Download links either open a blank page in a new tab or do nothing. PDFs that I am unable to view in Firefox can be viewed and/or downloaded in Safari most of the time and Chrome all of the time so I assume the problem is not my computer or operating system. I recently turned off the pop-up blocker but that did not make a difference. The problem has worsened over the past couple months, it appears that more and more web sites are moving to a different protocol for viewing/downloading PDFs. It used to happen occasionally but now I find that I am unable to view a majority - about 75% - of PDFs. I am using Firefox v18 for Mac with Mac OS X 10.6.8.

    hello ahegarty, you could try using the [https://addons.mozilla.org/firefox/addon/pdfjs/ PDF Viewer] addon, for more details also see [[PDF files are blank and can't be downloaded on Mac]].

  • Error message says need Adobe reader 8 or 9 installed to open pdfs from web pages yet Reader 9alredy

    Error message says need Adobe reader 8 or 9 installed to open pdfs from web pages yet Reader 9 is alredy installed on computer. Is this a 64 bit ossue although I am sure I did not have this problem prior to a replacement hard drive being installed.

    What is your operating system, browser?
    What is the exact message you are getting?

  • Where are files downloaded to on the mac when creating a pdf from web pages?

    where on the mac HD are files downloaded to  when creating a pdf from web pages?
    Im creating web pages from the whole site so creating a large document, so wondered where these fiels are stored on the mac so I can delete when finished as dont want to clog up the hard drive.

    Look at the LiveCycle server products.

Maybe you are looking for

  • Consuming WS using X.509 certificate not working after NetWeaver 7.02 SP08

    Hi For more than two years we have had a solution that consumes web services over HTTPS using an X.509 certificate for authentication. Now, after upgrading to NetWeaver 7.02 SP08, the web services no longer work. Today, roughly a week after the upgra

  • Hi iam saif from iraq i need imei for iphone 5

    Hi apple iam saif from iraq i need imei for iphone 5

  • Approvals & Notifications not working

    I followed the document http://download-west.oracle.com/docs/cd/B10464_03/portal.904/b10358/toc.htm followed instructions in 2.4 Working With Approvals 5.5 Setting Up Approvals to create Notification. But some how it doesn't work i.e. I login as supe

  • Displaying flat file box

    how to display only the flat file box i.e other boxes should not be displayed in bdc output...send the coding...

  • Remove preceding zeros on BW Infoobject

    Dear Experts, My BW infoobjects showing preceding zeros in the BI4.1 WEBI Prompts LOVs, so user don't want the zeros and they need only values and also they compare BEx analyzer with BO since BEx analyzer LOVs shows only values without zeros. Is ther