DROP DATABASE implementation

Forum related to Firebird

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
eversun
Fresh Boarder
Fresh Boarder
Posts: 20
Joined: 28.01.2020, 09:31

DROP DATABASE implementation

Post 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
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: DROP DATABASE implementation

Post 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
Post Reply