Page 1 of 1

DROP DATABASE implementation

Posted: 16.01.2024, 10:36
by eversun
Hi all !

Is there any way to process DROP DATABASE command (in ZEOS 7.3) ?
I found some old tricks for CREATE DATABASE, but as I see source code for CreateNewDatabase trick - only isc_create_database call is expected

Re: DROP DATABASE implementation

Posted: 16.01.2024, 16:00
by marsupilami
Hello eversun,
Firebird 4.0 Language Reference wrote:The DROP DATABASE statement deletes the current database. Before deleting a database, you have to
connect to it.
So - if you have to connect to the database you could do something like this:

Code: Select all

ZConnection.Connect;
ZConnection.ExecuteDirect('DROP DATABASE');
ZConnection.Disconnect;
I am not sure if this works though and what happens to the connection afterwards.

Best regards,

Jan