Menu

Database SQL Select parameters

Help
Anonymous
2011-11-20
2012-09-04
  • Anonymous

    Anonymous - 2011-11-20

    hello

    Still with the 2.0 version for the moment...

    Is there a way to pass parameters to a Select request ?

    I tried several thing without success...

    <database connection="jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=C:/ajeter.accdb"
                              jdbcclass="sun.jdbc.odbc.JdbcOdbcDriver">
    <template>
        SELECT Count(Sal.CheSem) AS nb
        FROM Sal
        GROUP BY Right([dule],4), Sal.CheSem
        HAVING (((Right([dule],4)) like "<db-param type="text"><var name='p1'/></db-param>") AND (Sal.ChenuSem  like "<db-param type="text"><var name='p2'/></db-param>"));
    </template>
    
    </database>
    
     
  • Alex Wajda

    Alex Wajda - 2011-11-21

    <template>........HAVING (((Right([dule],4)) like "${p1}")........ </template>

     
  • Anonymous

    Anonymous - 2011-11-26

    ok Thank you,

    Now an other one with the Update syntax I don't find the syntax to pass the
    value as parameter AND specify the ID in the where clause.

     

Log in to post a comment.