* * *

Author Topic: How do I set Sweep Interval in Firebird DB using IB components?  (Read 726 times)

RedOctober

  • Full Member
  • ***
  • Posts: 181
How do I set Sweep Interval in Firebird DB using IB components?
« on: January 11, 2018, 04:04:00 am »
I can see MON$SWEEP_INTERVAL in the MON$DATABASE system table, and I can display that to my user.  Now I need to allow my user to change the Sweep Interval.  My Windows app uses TFBAmin and TIBQuery etc. but if I do an:

UPDATE MON$DATABASE SET MON$SWEEP_INTERVAL = 0;

I get an error message saying operation not supported.  I get this same error message using FlameRobin, if I run the above SQL statement.  However, FlameRobin has a "Properties" page that allows the user to set the Sweep Interval.

How can I give my app the same functionality as FlameRobin?  I want to set the Sweep Interval, the Read Only, the Forced Writes and the Reserve Space settings for Firebird databases 2.5 and up. I don't think I can use "gfix" because my app connects to remote servers by IP address and port.

taazz

  • Hero Member
  • *****
  • Posts: 5018
Re: How do I set Sweep Interval in Firebird DB using IB components?
« Reply #1 on: January 11, 2018, 05:10:42 pm »
there is a component suite  that you can use for firebird (IBX : http://forum.lazarus.freepascal.org/index.php/topic,35052.msg231107.html#msg231107). It has the control TIBConfigService which has the method setsweepinterval. You can use it as is or you can copy only the code you are interested in. You can find it in the online package manager as IBX
« Last Edit: January 11, 2018, 05:56:30 pm by taazz »
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus