Announcement

Collapse
No announcement yet.

Questions about executeQuery,executeUpdate

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

  • dans
    replied
    use java.util.ArrayList instead of Array

    Leave a comment:


  • apatwa
    replied
    I am facing the same problem. How did you do this?

    Leave a comment:


  • Bleupomme
    replied
    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

    Leave a comment:


  • Bleupomme
    started a topic Questions about executeQuery,executeUpdate

    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
Working...
X