Announcement

Collapse
No announcement yet.

Questions about executeQuery,executeUpdate

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Questions about executeQuery,executeUpdate

    Hi,

    How do you use executeUpdate or executeCachedQuery with parameters?
    I tried to feed the function with an array but it seems to expect a java.util.List. I don't know how to do that in javascript.

    here is my non working code:
    var patientData=new Array();
    patientData.push($('LRN'));
    patientData.push($('SSN'));
    patientData.push($('Te_Id'));
    patientData.push($('Id_Patient'));
    patientData.push($('Id_User'));
    patientData.push($('BirthDate'));
    patientData.push($('Sex'));
    patientData.push($('Title'));
    patientData.push($('Nationality'));
    patientData.push($('InCountry'));
    patientData.push($('DeathDate'));
    patientData.push($('Dead'));
    patientData.push($('Create_Date'));
    patientData.push($('Last_Update'));
    patientData.push($('lname'));
    patientData.push($('lname'));
    patientData.push($('fname'));
    patientData.push($('ygname'));
    patientData.push($('Address'));
    patientData.push($('City'));
    patientData.push($('Region'));
    patientData.push($('PhoneHome'));
    patientData.push($('PhoneWork'));

    var result = dbConn.executeUpdate('INSERT IGNORE INTO patients (your_id,eurosid,te_id,id_patient,id_user,birth_da te,sex,title,nationality,incountry,death_date,dead ,create_date,last_update,lname,fname,ygname,adress ,city,region,phone1,phone2) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?);'
    ,patientData);

    Thank you

  • #2
    Re:Questions about executeQuery,executeUpdate

    First, forget about the double post.
    Secondly, I found the solution in a previous message so don't bother answering.
    You can instantiate a java class under Rhino

    Comment


    • #3
      I am facing the same problem. How did you do this?

      Comment


      • #4
        use java.util.ArrayList instead of Array
        Daniel Svanstedt
        Software Engineer
        Mirth Corporation

        Want professional services, support, and enterprise or virtual appliances? It's all available from the Mirth Corporation:
        Mirth Support | Mirth Training | Mirth Appliances | Online Training | Developer Q&A

        Don't forget, Mirth Support gives you access to all of our online training videos, and silver support gives you access to developer Q&As!

        Comment

        Working...
        X