use the parameter, it should work with your preferred components.
myQuery.SQL.Text := 'alter sequence gen_telagent_id restart with :val';
myQuery.Params.ParamByName('val').AsInteger := val;
myQuery.ExecSQL();
Actual syntax may vary depending on the components you use to connect to Firebird.
source
share