Help with calling a procedure

Dynamic SQL Error SQL error code = -104 Token unknown - line 1, char 1 SP_ABM_CONVOCATORIA
SP_ABM_CONVOCATORIA 1, -1, 1, 43, ‘2011-02-01’, ‘2011-04-30’, ‘as’, ‘A’, 1, 5, 1, 10, ‘N’, ‘asasasasa’, ‘2011-02-01’, ‘2011-04-30’, ‘2011-02-01’, ‘2011-04-30’, ‘2011-02-01’, ‘2011-04-30’

Iknow this error is specific to firebird DBm but if I copy this: SP_ABM_CONVOCATORIA 1, -1, 1, 43, ‘2011-02-01’, ‘2011-04-30’, ‘as’, ‘A’, 1, 5, 1, 10, ‘N’, ‘asasasasa’, ‘2011-02-01’, ‘2011-04-30’, ‘2011-02-01’, ‘2011-04-30’, ‘2011-02-01’, ‘2011-04-30’

And excute it in and IBExpert ot works ok, so the parameters is ok, any help?

Re: Help with calling a procedure

Sorry, note that the SP is used when insert a new row in a table, with the “Procedures” wizard

Re: Help with calling a procedure

Hello, I solve the problem looking at the gennerated file and do some adjustment, I replace what is commented with red line:

if ($bInsertOk)
{
if (in_array(strtolower($this->Ini->nm_tpbanco), $this->Ini->nm_bases_access))
{
$comando = “SP_ABM_CONVOCATORIA $this->band, $this->i_idconvocatoria, $this->idsede, $this->idmalla, #$this->fechaini#, #$this->fechafin#, ‘$this->observacion’, ‘$this->estado’, $this->cursoini, $this->cursofin, $this->semini, $this->semfin, ‘$this->turno’, ‘$this->descperiodo’, #$this->peracadinicio#, #$this->peracadfin#, #$this->pereconinicio#, #$this->pereconfin#, #$this->validodesde#, #$this->validohasta#”;
}
elseif (in_array(strtolower($this->Ini->nm_tpbanco), $this->Ini->nm_bases_mssql))
{
$comando = “SP_ABM_CONVOCATORIA $this->band, $this->i_idconvocatoria, $this->idsede, $this->idmalla, ‘$this->fechaini’, ‘$this->fechafin’, ‘$this->observacion’, ‘$this->estado’, $this->cursoini, $this->cursofin, $this->semini, $this->semfin, ‘$this->turno’, ‘$this->descperiodo’, ‘$this->peracadinicio’, ‘$this->peracadfin’, ‘$this->pereconinicio’, ‘$this->pereconfin’, ‘$this->validodesde’, ‘$this->validohasta’”;
}
elseif (in_array(strtolower($this->Ini->nm_tpbanco), $this->Ini->nm_bases_oracle))
{
$comando = “BEGIN SP_ABM_CONVOCATORIA($this->band, $this->i_idconvocatoria, $this->idsede, $this->idmalla, ‘$this->fechaini’, ‘$this->fechafin’, ‘$this->observacion’, ‘$this->estado’, $this->cursoini, $this->cursofin, $this->semini, $this->semfin, ‘$this->turno’, ‘$this->descperiodo’, ‘$this->peracadinicio’, ‘$this->peracadfin’, ‘$this->pereconinicio’, ‘$this->pereconfin’, ‘$this->validodesde’, ‘$this->validohasta’); END;”;
}
elseif (in_array(strtolower($this->Ini->nm_tpbanco), $this->Ini->nm_bases_postgres))
{
$comando = “SELECT SP_ABM_CONVOCATORIA( $this->band, $this->i_idconvocatoria, $this->idsede, $this->idmalla, ‘$this->fechaini’, ‘$this->fechafin’, ‘$this->observacion’, ‘$this->estado’, $this->cursoini, $this->cursofin, $this->semini, $this->semfin, ‘$this->turno’, ‘$this->descperiodo’, ‘$this->peracadinicio’, ‘$this->peracadfin’, ‘$this->pereconinicio’, ‘$this->pereconfin’, ‘$this->validodesde’, ‘$this->validohasta’)”;
}
elseif (in_array(strtolower($this->Ini->nm_tpbanco), $this->Ini->nm_bases_mysql))
{
$comando = “CALL SP_ABM_CONVOCATORIA( $this->band, $this->i_idconvocatoria, $this->idsede, $this->idmalla, ‘$this->fechaini’, ‘$this->fechafin’, ‘$this->observacion’, ‘$this->estado’, $this->cursoini, $this->cursofin, $this->semini, $this->semfin, ‘$this->turno’, ‘$this->descperiodo’, ‘$this->peracadinicio’, ‘$this->peracadfin’, ‘$this->pereconinicio’, ‘$this->pereconfin’, ‘$this->validodesde’, ‘$this->validohasta’)”;
}
else
{
//$comando = “SP_ABM_CONVOCATORIA $this->band, $this->i_idconvocatoria, $this->idsede, $this->idmalla, ‘$this->fechaini’, ‘$this->fechafin’, ‘$this->observacion’, ‘$this->estado’, $this->cursoini, $this->cursofin, $this->semini, $this->semfin, ‘$this->turno’, ‘$this->descperiodo’, ‘$this->peracadinicio’, ‘$this->peracadfin’, ‘$this->pereconinicio’, ‘$this->pereconfin’, ‘$this->validodesde’, ‘$this->validohasta’”;

      [b]$comando = "execute procedure SP_ABM_CONVOCATORIA $this->band, $this->i_idconvocatoria, $this->idsede, $this->idmalla, '$this->fechaini', '$this->fechafin', '$this->observacion', '$this->estado', $this->cursoini, $this->cursofin, $this->semini, $this->semfin, '$this->turno', '$this->descperiodo', '$this->peracadinicio', '$this->peracadfin', '$this->pereconinicio', '$this->pereconfin', '$this->validodesde', '$this->validohasta'";[/b]

Re: Help with calling a procedure

Since I use Firebird, it gets to the else part, and it needs the “execute procedure” to actually execute the SP