开发者

How to modify a generator value

开发者 https://www.devze.com 2023-02-04 18:46 出处:网络
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 para

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.

开发者_Python百科

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消