怎么样在程序拼凑pro*c的sql语句啊?windows里用ado的话直接可以执行拼凑完的语sql语句,可是pro*c是要经过编译才能用的,我要怎么实现类似的思路啊?
如比下面的伪代码 
string strSQL;
strSQL = "Select distinct AlarmType,TypeDesp  " +
                        "from TblAlarmAction "
     if(条件)

    strSQL+="where AlarmID=变量1 and ... }
                        
      else
   strSQL+="where AlarmID=变量2 and ...