Passing array of structures back to java from c

I have a DLL in C that I'm calling from a Java servlet. The C DLL creates a bunch of arrays of structures that I would like to be able to bring back to the Java servlet and process further. How difficult is this and does anyone have anywhere to point me that shows how it can be done?

1. In general, java knows nothing about structures. So you have to define eqquivalent java classes, and write code to move the data from C structs into the classes.
2. JNI supports definition of arrays of objects, which can be passed back from the dll.
You may find some code generators that will help you with the
CStruct->JavaObject definition. This may be a blind alley, but check out JACE.

Similar Messages

  • Pass array of value to Oracle Java Beans (for forms)

    Hi,
    How I can pass a array value from oracle Form to Java bean.
    With regards
    Satheesh Kumar

    Hi,
    Thanks for your immediate response.
    I have one more doubt. I am trying to create a Hirachical tree for form using Jtree. For dynmically populating tree data I want to pass array records from oracle forms.
    In my understanding, Java importer array will work if we do importing the java beans component to oracle forms, otherwise no.
    Is it possible I can pass array variable with out importing my javacomponent.
    With regards

  • Passing jCharArray back to Java from C library

    Hi
    I need help with my JNI implementation where I need the C method to return a jcharArray, not a jstring (I dont want the array null terminated). Here is my code:
    JNIEXPORT jcharArray JNICALL Java_lpi_crv_ltoApiWrapper_ltoGetResponse
    (JNIEnv *env, jobject obj)
    jcharArray jc;
    jchar cArr; / debug only */
    printf("%s\n",response);
    jc=(*env)->NewCharArray(env,actualLength);
    (*env)->SetCharArrayRegion(env,jc,0,actualLength,(jchar*)response);
    cArr=(*env)->GetCharArrayElements(env,jc,0); /* debug only */
    printf("%s\n",(char *)cArr); /* debug only */
    (*env)->ReleaseCharArrayElements(env,jc,cArr,0); /* debug only */
    return (jc);
    response is a public char array.
    This code seems to return a series of ? in my calling java app, yet the conversion of the jc variable back to a char array (the debug only lines) seems to output the correct values. What am I doing wrong?

    jchar is 16 bit (unsigned) while char (of C) is 8 bit.
    Try to use a jbyteArray instead of jcharArray.

  • Case structure back and forth from LED

    Hello, I'm trying to make a case structure switch back and forth everytime a boolean LED indicator goes off. I want case one to start when a button is pushed, switch to case two when an LED indicator goes on, then switch back to case one when that same LED goes on again, then case two the next time the light goes on, and so on. The LED is set to go on every ten seconds. So far i have the case structure in a while loop but im not sure how to get them to switch back and forth using this one LED. Any suggestions?

    Then you have two asynchronous parallel loops, and you want one of them to receive information (Boolean) from the other in order to determine its state.
    If the loop with the elapsed time contains nothing but elapsed time, then consider moving it to the first loop.
    Otherwise, you should use a form of synchronization communication, such as a Notifier or User Event, to send data from your loop with the elapsed time to your loop with the case structure.

  • JNI: Getting String | StringBuffer  to Java from C using input argument

    I've written a native method in C which takes command String from Java, executes the command, and obtains both an integer return_code and a C-string result_string as an output. The return_code goes back to Java from the return statement at the end of the native method...my problem is, that I would like to pass into the native method either a String or StringBuffer, and use that to relay the result_string back to the Java code, as well. Eg., loosely, if I have a
    JNIEXPORT jint JNICALL ExecuteCmd
    (JNIEnv *env, jclass jcls, jstring cmdString, jobject returnBuffer)
    where jobject returnBuffer is a StringBuffer created as StringBuffer(2048), I'd like to take return_string once I have it and do something like
    returnBuffer = env->NewStringUTF(result_string);
    (I know the syntax env->NewStringUTF is a bit different to what's in the JNI book, but it's what works on the HP-UX system I'm using.)
    I know already that this particular bit of code doesn't work. My question is, does the general idea have any potential to work, or am I trying to do something that's impossible?

    Your general approach works just fine. What you have to do is use JNI to find the appropriate method for the StringBuffer class, and invoke it.

  • ORA-00932 when trying to pass ARRAY from Java SP to PL/SQL

    Hi all
    I am trying to pass ARRAYs back and forth between PL/SQL and Java stored procedures. But I keep getting:
    ORA-00932: inconsistent datatypes: expected a return value that is an instance of a user defined Java class convertible to an Oracle type got an object that could not be converted
    Here's my PL/SQL:
    create or replace type CONTENTP.sentences_array as VARRAY(1000) of CLOB
    -- I've also tried .. as TABLE of CLOB and varray/table of VARCHAR2
    declare
    proc_clob CLOB;
    arr SENTENCES_ARRAY;
    begin
    SELECT document_body
    into proc_clob
    from documents
    where document_id = 618784;
    arr := processdocument.sentencesplit (proc_clob);
    end;
    PROCESSDOCUMENT package definition:
    CREATE OR REPLACE PACKAGE CONTENTP.PROCESSDOCUMENT AS
    FUNCTION sentenceSplit(Param1 CLOB)
    return SENTENCES_ARRAY
    AS
    LANGUAGE java
    NAME 'com.contentp.documents.ProcessDocument.sentenceSplit(oracle.sql.CLOB) return oracle.sql.ARRAY';
    FUNCTION removeHTML(Param1 CLOB)
    return CLOB
    AS
    LANGUAGE java
    NAME 'com.contentp.documents.ProcessDocument.removeHTML(oracle.sql.CLOB) return oracle.sql.CLOB';
    end;
    Java sentenceSplit code:
    public static oracle.sql.ARRAY sentenceSplit ( CLOB text) throws IOException, SQLException
    Connection conn = new OracleDriver().defaultConnection();
    String[] arrSentences = sent.getsentences ( CLOBtoString (text) );
    ArrayDescriptor arrayDesc =
    ArrayDescriptor.createDescriptor ("SENTENCES_ARRAY", conn);
    ARRAY ARRSentences = new ARRAY (arrayDesc, conn, arrSentences);
    return ARRSentences;
    I have confirmed that the String[] arrSentences contains a valid string array. So the problem seems to be the creation and passing of ARRSentences.
    I have looked at pages and pages of documents and example code, and can't see anything wrong with my declaration of ARRSentences. I'm at a loss to explain what's wrong.
    Thanks in advance - any help is much appreciated!

    I am trying to do something similar but seems like getting stuck at registerOutParameter for this.
    Type definition:
    CREATE OR REPLACE
    type APL_CCAM9.VARCHARARRAY as table of VARCHAR2(100)
    Java Stored Function code:
    public static ARRAY fetchData (ARRAY originAreaCds, ARRAY serviceCds, ARRAY vvpcs) {
    Connection connection = null;
         ARRAY array = null;
         try {
         connection = new OracleDriver ().defaultConnection();
         connection.setAutoCommit(false);
    ArrayDescriptor adString = ArrayDescriptor.createDescriptor("VARCHARARRAY", connection);
    String[] result = new String [2];
    result[0] = "Foo";
    result[1] = "Foo1";
    array = new ARRAY (adString, connection, result);
    connection.commit ();
    return array;
    } catch (SQLException sqlexp) {
    try {
    connection.rollback();
    } catch (SQLException exp) {
    return array;
    Oracle Stored Function:
    function FETCH_TRADE_DYN_DATA (AREA_CDS IN VARCHARARRAY, SERVICE_CDS IN VARCHARARRAY,VV_CDS IN VARCHARARRAY) return VARCHARARRAY AS LANGUAGE JAVA NAME 'com.apl.ccam.oracle.js.dalc.TDynAllocation.fetchData (oracle.sql.ARRAY, oracle.sql.ARRAY, oracle.sql.ARRAY) return oracle.sql.ARRAY';
    Java Code calling Oracle Stored Procedure:
    ocs = (OracleCallableStatement) oraconn.prepareCall(queryBuf.toString());
                   ArrayDescriptor adString = ArrayDescriptor.createDescriptor("VARCHARARRAY", oraconn);
                   String[] originAreaCds = sTDynAllocationVO.getGeogAreaCds();
                   ARRAY areaCdArray = new ARRAY (adString, oraconn, originAreaCds);
                   ocs.registerOutParameter(1, OracleTypes.ARRAY);
                   ocs.setArray (2, areaCdArray);
                   String[] serviceCds = sTDynAllocationVO.getServiceCds();
                   ARRAY serviceCdsArray = new ARRAY (adString, oraconn, serviceCds );
                   ocs.setArray (3, serviceCdsArray);
                   String[] vvpcs = sTDynAllocationVO.getVesselVoyagePortCdCallNbrs();
                   ARRAY vvpcsArray = new ARRAY (adString, oraconn, vvpcs);
                   ocs.setArray (4, vvpcsArray);
    ocs.execute();
    ARRAY results = ocs.getARRAY(1);
    Error I get:
    Parameter Type Conflict: sqlType=2003
    Thanks for help in advance.

  • How to pass array into xslt from java

    i have a xslt in which i am passing some parameter from java there is one parameter which is a array in java which i need to pass becouse array length is not defined so that xslt will work dynakically according to the parameter.
    right now i am passing parameter but not able to send the array parameter that's why my code is not fully dynamic
    please give suggestion.
    anagh

    it is not possible to pass array by using XSLT, you can wirite all values into a String with certain delim symbol, pass this string, then use xsl.substring() to get different values.

  • Passing Array of java objects to and from oracle database-Complete Example

    Hi all ,
    I am posting a working example of Passing Array of java objects to and from oracle database . I have struggled a lot to get it working and since finally its working , postinmg it here so that it coudl be helpful to the rest of the folks.
    First thinsg first
    i) Create a Java Value Object which you want to pass .
    create or replace and compile java source named Person as
    import java.sql.*;
    import java.io.*;
    public class Person implements SQLData
    private String sql_type = "PERSON_T";
    public int person_id;
    public String person_name;
    public Person () {}
    public String getSQLTypeName() throws SQLException { return sql_type; }
    public void readSQL(SQLInput stream, String typeName) throws SQLException
    sql_type = typeName;
    person_id = stream.readInt();
    person_name = stream.readString();
    public void writeSQL(SQLOutput stream) throws SQLException
    stream.writeInt (person_id);
    stream.writeString (person_name);
    ii) Once you created a Java class compile this class in sql plus. Just Copy paste and run it in SQL .
    you should see a message called "Java created."
    iii) Now create your object Types
    CREATE TYPE person_t AS OBJECT
    EXTERNAL NAME 'Person' LANGUAGE JAVA
    USING SQLData (
    person_id NUMBER(9) EXTERNAL NAME 'person_id',
    person_name VARCHAR2(30) EXTERNAL NAME 'person_name'
    iv) Now create a table of Objects
    CREATE TYPE person_tab IS TABLE OF person_t;
    v) Now create your procedure . Ensure that you create dummy table called "person_test" for loggiing values.
    create or replace
    procedure give_me_an_array( p_array in person_tab,p_arrayout out person_tab)
    as
    l_person_id Number;
    l_person_name Varchar2(200);
    l_person person_t;
    l_p_arrayout person_tab;
    errm Varchar2(2000);
    begin
         l_p_arrayout := person_tab();
    for i in 1 .. p_array.count
    loop
         l_p_arrayout.extend;
         insert into person_test values(p_array(i).person_id, 'in Record '||p_array(i).person_name);
         l_person_id := p_array(i).person_id;
         l_person_name := p_array(i).person_name;
         l_person := person_t(null,null);
         l_person.person_id := l_person_id + 5;
         l_person.person_name := 'Out Record ' ||l_person_name ;
         l_p_arrayout(i) := l_person;
    end loop;
    p_arrayout := l_p_arrayout;
         l_person_id := p_arrayout.count;
    for i in 1 .. p_arrayout.count
    loop
    insert into person_test values(l_person_id, p_arrayout(i).person_name);
    end loop;
    commit;
    EXCEPTION WHEN OTHERS THEN
         errm := SQLERRM;
         insert into person_test values(-1, errm);
         commit;
    end;
    vi) Now finally create your java class which will invoke the pl/sql procedure and get the updated value array and then display it on your screen>Alternatively you can also check the "person_test" tbale
    import java.util.Date;
    import java.io.*;
    import java.sql.*;
    import oracle.sql.*;
    import oracle.jdbc.driver.*;
    import java.text.DateFormat;
    import java.text.ParseException;
    import java.text.SimpleDateFormat;
    public class ArrayDemo
    public static void passArray() throws SQLException
    Connection conn = getConnection();
    ArrayDemo a = new ArrayDemo();
    Person pn1 = new Person();
    pn1.person_id = 1;
    pn1.person_name = "SunilKumar";
    Person pn2 = new Person();
    pn2.person_id = 2;
    pn2.person_name = "Superb";
    Person pn3 = new Person();
    pn3.person_id = 31;
    pn3.person_name = "Outstanding";
    Person[] P_arr = {pn1, pn2, pn3};
    Person[] P_arr_out = new Person[3];
    ArrayDescriptor descriptor =
    ArrayDescriptor.createDescriptor( "PERSON_TAB", conn );
    ARRAY array_to_pass =
    new ARRAY( descriptor, conn, P_arr);
    OracleCallableStatement ps =
    (OracleCallableStatement )conn.prepareCall
    ( "begin give_me_an_array(?,?); end;" );
    ps.setARRAY( 1, array_to_pass );
         ps.registerOutParameter( 2, OracleTypes.ARRAY,"PERSON_TAB" );
         ps.execute();
         oracle.sql.ARRAY returnArray = (oracle.sql.ARRAY)ps.getArray(2);
    Object[] personDetails = (Object[]) returnArray.getArray();
    Person person_record = new Person();
    for (int i = 0; i < personDetails.length; i++) {
              person_record = (Person)personDetails;
              System.out.println( "row " + i + " = '" + person_record.person_name +"'" );
                        public static void main (String args[]){
         try
                             ArrayDemo tfc = new ArrayDemo();
                             tfc.passArray();
         catch(Exception e) {
                        e.printStackTrace();
              public static Connection getConnection() {
         try
                             Class.forName ("oracle.jdbc.OracleDriver");
                             return DriverManager.getConnection("jdbc:oracle:thin:@<<HostNanem>>:1523:VIS",
                             "username", "password");
         catch(Exception SQLe) {
                        System.out.println("IN EXCEPTION BLOCK ");
                        return null;
    and thats it. you are done.
    Hope it atleast helps people to get started. Comments are appreciated. I can be reached at ([email protected]) or [email protected]
    Thanks
    Sunil.s

    Hi Sunil,
    I've a similar situation where I'm trying to insert Java objects in db using bulk insert. My issue is with performance for which I've created a new thread.
    http://forum.java.sun.com/thread.jspa?threadID=5270260&tstart=30
    I ran into your code and looked into it. You've used the Person object array and directly passing it to the oracle.sql.ARRAY constructor. Just curios if this works, cos my understanding is that you need to create a oracle.sql.STRUCT out of ur java object collection and pass it to the ARRAY constructor. I tried ur way but got this runtime exception.
    java.sql.SQLException: Fail to convert to internal representation: JavaBulkInsertNew$Option@10bbf9e
                        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
                        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
                        at oracle.jdbc.oracore.OracleTypeADT.toDatum(OracleTypeADT.java:239)
                        at oracle.jdbc.oracore.OracleTypeADT.toDatumArray(OracleTypeADT.java:274)
                        at oracle.jdbc.oracore.OracleTypeUPT.toDatumArray(OracleTypeUPT.java:115)
                        at oracle.sql.ArrayDescriptor.toOracleArray(ArrayDescriptor.java:1314)
                        at oracle.sql.ARRAY.<init>(ARRAY.java:152)
                        at JavaBulkInsertNew.main(JavaBulkInsertNew.java:76)
    Here's a code snippet I used :
    Object optionVal[] =   {optionArr[0]};   // optionArr[0] is an Option object which has three properties
    oracle.sql.ArrayDescriptor empArrayDescriptor = oracle.sql.ArrayDescriptor.createDescriptor("TT_EMP_TEST",conn);
    ARRAY empArray = new ARRAY(empArrayDescriptor,conn,optionVal);If you visit my thread, u'll see that I'm using STRUCT and then pass it to the ARRAY constructor, which works well, except for the performance issue.
    I'll appreciate if you can provide some information.
    Regards,
    Shamik

  • Pass arrays from Java to PL/SQL procedure.

    Hi All,
    Can some body give an example, where an array of strings is passed from java to a PL/SQL procedure.
    Any help in this regard is appreciated.
    Thanks,
    Prashant

    Kiran Kumar Gunda wrote:
    I would want to use Oracle provided (Oracle Extensions) API to pass arrays to PL/SQL
    procedure from Java. I am using weblogic connection pool, but the 'createDescriptor'
    method donot allow Pooled connection. So I have taken Physical Connection by casting
    to 'WLConnection'. Now, weblogic strongly suggest NOT to use this,as pooling capabilities
    will be disabled.
    But by setting RemoveInfectedConnectionsEnabled to false, we can ask weblogic
    to return the Physical Connection to Pool. I have tested this with the attached
    code. I DON'T find any issue.Good. The only real risk to obtaining the physical connection is retaining and
    using it beyond the current thread execution. Your code looks OK. The only thing
    I'd suggest is to add to the finally block. I would put a separate try-catch-ignore
    block around every action in the finally, so if one fails, the others are still
    done.
    As long as you're writing good JDBC like that, there is no risk to telling the
    pool to trust the code, by setting RemoveInfectedConnectionsEnabled to false.
    That way you'll retain all the performance of the pools.
    Joe
    >
    I want your opinion in this, so that I will be confident in using this feature
    in our application.
    Note : Please look at the sample code that I am using. I AM NOT GOING TO USE PHYSICAL
    CONNECTIONS for normal operations. I will use Physical Connection only when I
    want to pass Arrays to Oracle.
    Thanks
    Kiran

  • How to pass an array or structure, in addition to a query, or multiple queries to the Report Builder as parameters

    Is there a way to pass an array or structure for example as parameters, in addition to a query, or multiple queries to the Report Builder in CF8? I believe this was recommended by users to be in CF8.

    BrianO,
    Although it's been a while, I thought I'd provide the code to do this for you. It works for me in CF8, and probably will in CF7.
    Here I create a structure called My, and provide that one parameter to my CFReportParam tag.
    <CFSet My = {
    Client = "Client Name",
    ReportDateFrom = DateFormat(ThisStartDate, DateMask),
    ReportDateTo = DateFormat(ThisEndDate, DateMask),
    PageHeaderImage = ImagePath & "\Logos\Page_Header.png",
    WatermarkImage = ImagePath & "\Logos\Watermark.png",
    GetBarSummary = GetBarSummary,
    GetPieSummary = GetPieSummary
    }>
    <CFReport Template="#ReportPath#\SpendSummary.cfr" Format="PDF" Query="GetSummary">
    <CFReportParam Name="My" Value="#My#">
    </CFReport>
    Inside the report itself, reference the given parameter as Param.My.PageHeaderImage for example. It can be referenced that way from any expression inside the report builder. You can even use the queries as the data source for charts (using the Data From a Query -> Query Builder -> Advanced) by entering "Param.My.GetPieSummary" where it says "Variable containing query object".
    HTH
    Swift

  • URGENT: Passing Array from JSP to a Stored Procedure

    Hi,
    Can some one please help me understanding how can I pass array from JSP page to a stored procedure in database.
    Thanks in advance.
    Jatinder

    Thanks.
    I tried ArrayExampla.java and was successful in passing array values to the stored database procedure.
    How can I use this class in JSP? Like I have first JSP where in I will collect input from the user and then submit it to the second JSP - that needs to call the ArrayExample.java to pass the values as array to the database.
    How should I call this java code in my second JSP?
    Thanks in advance.

  • Passing array of Types to java class

    I am trying to pass a user defined type (that is an array) from PL/Sql to a javaclass. Here are the definitions that make-up the parameter to pass from PL/Sql to Java (uri_digest_array):
    CREATE OR REPLACE TYPE uri_digest as object (uri VARCHAR2(256),
    digest_value CLOB);
    CREATE OR REPLACE TYPE uri_digest_array AS VARRAY(10) OF uri_digest;
    In Oracle-land, java classes are published to PL/Sql by way of the following definition. Note that the intent here is to have compatible data-types.
    CREATE OR REPLACE FUNCTION SIGNRETURNINGXML (p_array IN uri_digest_array)
    RETURN LONG
    AS LANGUAGE JAVA
    NAME 'SignReturningXml.main(oracle.sql.Array) return java.lang.String';
    Here is a fragment of the java class code:
    class SignReturningXml {
    public static String main(String [] [] signItems ) // I have no idea what datatype to use here!
    { . . . . The code in here would process the passed array normally from first entry to last.
    Currently I get the following error:
    PLS-00311: the declaration of
    "SignReturningXml.main(oracle.sql.Array) return
    java.lang.String" is incomplete or malformed
    I could use some suggestions on resolving the datatype conflicts. Any ideas? Has anyone tried this kind of thing?
    Thanks,
    Michael

    Michael,
    At the risk of another [non] useful response, I meant that you should try searching the "Ask Tom" Web site, because usually you will find an answer to your question that has already been asked by someone else. Perhaps these will be helpful:
    [url=http://asktom.oracle.com/pls/ask/f?p=4950:8:1320383202207153292::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:8908169959941
    ]Can I Pass a nested table to Java from a pl/sql procedure
    [url=http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:712625135727
    ]passing arrays into pl/sql stored procedures
    Good Luck,
    Avi.

  • Passing array from JS to method of applet

    There is unable in IE pass array of values from javascript to method of applet, but in Mozilla it's working fine. In IE i have got exception:
    Exception:
    java.lang.Exception: setTest{0} :no such method exists
         at sun.plugin.com.JavaClass.getMethod1(Unknown Source)
         at sun.plugin.com.JavaClass.getDispatcher(Unknown Source)
         at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)
         at sun.plugin.com.DispatchImpl$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.plugin.com.DispatchImpl.invoke(Unknown Source)
    java.lang.Exception: java.lang.Exception: setTest{0} :no such method exists
         at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)
         at sun.plugin.com.DispatchImpl$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.plugin.com.DispatchImpl.invoke(Unknown Source)
    JavaScript code:
    var testArr=[];
        testArr[0]=1;
        testArr[1]=2;
        testArr[2]=3;
        document.sync.setTest(testArr);
    Applet method:
    public void setTest(Object[] test){
            System.out.println("Test "+test.length);
            for (Object o: test){
                System.out.println(o.toString());
        }How do passing in IE?

    yes, MAYSCRIPT just allow to call methods. but as i know it's unable to pass simply array from js to applet and from applet to js. so i convert array of values to String and in applet i use StringTokenizer to parsing. Thanks. ;)

  • Accessing Array of Structures from Coldfusion

    I am having a problem accessing an array of structures from
    Coldfusion within my flex application. Here is how I make my Array:
    (GetRegions is a type Query and Type is a string variable)
    <cfset ReturnArray = ArrayNew(1)>
    <cfset ReturnArray[1] = StructNew()>
    <cfset ReturnArray[1].Query = GetRegions>
    <cfset ReturnArray[2] = Type>
    Within flex I am trying to access the results in the
    following way:
    private function dataHandler(event:ResultEvent):void{
    Query_Filter = new ArrayCollection(event.result[0].QUERY as
    Array);
    myString = event.result[1] as String;
    Can anybody help me with this. I want a way to return a query
    and a string back from coldfusion.
    Thanks for the help,
    Jeff

    So now I changed my code to the following in CF:
    <cfset Type = "MyString">
    <cfset ReturnArray = ArrayNew(1)>
    <cfset ReturnArray[1] = StructNew()>
    <!--- set up query GetRegions --->
    <cfset ReturnArray[1] = GetRegions>
    <cfset ReturnArray[2] = Type>
    <!--- Return Array --->
    <cfreturn ReturnArray>
    Now in flex I have the following dataHandler Function:
    Alert.show("hello: "+ObjectUtil.toString(event.result[0]));
    Query_Filter = new ArrayCollection(event.result as Array);
    Now I set up a List box with Query_Filter as the dataprovider
    but the results aren't showing correctly. The first item in the
    list box is displayed as [object, Object], [object, Object] and the
    second item is my String.
    Does anybody know how to break up the query to a variable and
    the string to its own variable in the dataHandler function.
    Thanks for any and all help

  • Passing an array of structures to an Oracle stored procedure (CFMX)

    I'm looking to write a Oracle stored procedure where I would pass in an array of structures and loop over each iteration to insert the bits and pieces within the structures to the DB.,
    I haven't written this type of procedure / package before.  I am planning to do an sp / package similar to what is sketched out in the second reply to this thread: http://forums.oracle.com/forums/thread.jspa?threadID=1078772
    Assuming I do, how can I call the procedure from ColdFusion (I'm using MX) and pass in my array?  As far as I can see, none of the CF_SQL_Types make sense.

    Let me know if you make any progress.  I'm fighting the same battle.  What I've done so far is to convert my array of struct into a delimited CLOB that looks like this:
    prop1;prop2;prop3|prop1;prop2;prop3|prop1;prop2;prop3|prop1;prop2;prop3|
    Then I wrote a stored proc to suck it up using a pipelined function.  It's not to bad but parsing the CLOB on the ORACLE side is somewhat time consuming.
    I've also converted the array to XML and used dbms_xmlstore to convert but, on large arrays, it is very slow and the CLOB gets huge fast.
    I was hoping to use the cf_sql_refcursor but I can't figure out how.
    Warren

Maybe you are looking for

  • How to apply check constraint at a row level?

    I am new to SQL. I have a schema like this. Students(student_id,student_name,club,date_of_passed_out). clubs(club_name,club_in_charge,club_inaugurated_date). The students can act as the club in charges. So it is not possible for a student to act as a

  • Chinese Character Sets

    I'm setting up a web site, as a favor for a friend, that will be in Chinese and French. I'm not sure what the best page encoding would be. My friend sent me some sample Chinese, and she said, "The font I use is 'Simsun'." Otherwise, she is not very t

  • 2032 error when connecting SQL server with Xcelsius

    Hi, Here are the short note about it 1)The dashboard is directly linked to database using aspx page 2)the data in the database refreshed using the aspx script. 3) we have a accordion menu and a 5 levels of filter and 10 charts Problem Description rec

  • Video Compression Failure, Video Count Off

    So I had a large video that I was looking to upload to YouTube. It went through the compression process until the very end of the progress bar where it stopped just short of complete. The iPhone went into auto-sleep mode and when I came back, everyth

  • Printing pdfs

    When I print a pdf document some of the lines of text are a lighter black than the rest of the copy. This only happens with pdfs and it isn't always in the same location on the page. Are there settings I'm missing?