Page 1 of 1

Error 707

Posted: Fri 05 Aug 2016 10:02
by assapan
Hi , I got an error [FireDAC][Stan]-707. L'index est hors limites pour le paramètre (paramètre [%d], index [%s], limites [0..%d]) when in query contains "???" .
Request works fine when TitreEvenement doesn't contains "???"
Can someone help ?
here is the Sql.text
INSERT INTO evenements (idCalendriers,DebutEvenement,FinEvenement,TitreEvenement,Lieu,Description,idReservation,idbaptemes,idenmaintenance,idaeroclub) values(163,:debut,:fin,"(R) F-BFES xxx ???-LP","ici","du 04/08/2016 10:30:00\nau 04/08/2016 11:00:00\n--------------\n",1143,NULL,NULL,35)

Code: Select all

  Q := CreateQuery;
  try
    Try
      Q.Connection.StartTransaction;
      Q.SQL.Text := SQL_INSERT + const_EVENEMENTS + ' (' //
        + const_EVENEMENTS_IDCALENDRIERS //
        + ',' + const_EVENEMENTS_DEBUTEVENEMENT //
        + ',' + const_EVENEMENTS_FINEVENEMENT //
        + ',' + const_EVENEMENTS_TITREEVENEMENT //
        + ',' + const_EVENEMENTS_LIEU //
        + ',' + const_EVENEMENTS_DESCRIPTION //
        + ',' + const_EVENEMENTS_IDRESERVATION //
        + ',' + const_EVENEMENTS_IDBAPTEMES //
        + ',' + const_EVENEMENTS_IDENMAINTENANCE //
        + ',' + const_EVENEMENTS_IDAEROCLUB //
        + ') values(' //
        + idCalendrier.ToSql //
       + ',:debut' //
       + ',:fin' //
        + ',' + Titre.ToSql //
        + ',' + Lieu.ToSql //
        + ',' + Description.ToSql //
        + ',' + idReservation.ToSqlNull //
        + ',' + idBapteme.ToSqlNull //
        + ',' + idEnMaintenance.ToSqlNull //
        + ',' + idaeroclub.ToSql //
        + ')'; //

      Q.ParamByName('debut').AsDateTime := Debut;
      Q.ParamByName('fin').AsDateTime := Fin;
      Q.ExecSQL;
      Result := Last_insert_id;
      Q.Connection.Commit;
    except
      Q.Connection.Rollback;
      raise;

    End;

Re: Error 707

Posted: Fri 05 Aug 2016 12:50
by ViktorV
The provided error means that you are using FireDAC instead of MyDAC. We provide support only for users of our products. To solve the issue, please contact FireDAC technical support.

Re: Error 707

Posted: Fri 05 Aug 2016 13:07
by assapan
Sorry i Were thinking Firedac was a MyDac product !

Re: Error 707

Posted: Fri 05 Aug 2016 13:54
by ViktorV
If you have any questions concerning our products, please don't hesitate to contact us - and we will try to help you resolve them.