I want to modify a generator value in Delphi with Firebird 2.5. The Statement is:
ALTER SEQUENCE GEN_NAME RESTART WITH value
. What I want is that the value not to be a number but a variable or a parameter like:
ALTER SEQUENCE GEN_TELAGENT_ID RESTART WITH val;
where val get a different integer value I don't know yet.
I hope I made myself understood. Sorry for my not so good English. Thanks for the answers.
use a parameter, with your preferred components it should work.
myQuery.SQL.Text := 'alter sequence gen_telagent_id restart with :val';
myQuery.Params.ParamByName('val').AsInteger := val;
myQuery.ExecSQL();
Actual syntaxis may vary depending on the components you use to connect to Firebird.
精彩评论