Board index » delphi » Shutting down Sybase database from Delphi

Shutting down Sybase database from Delphi

I have already looked at the archives and so far haven't found any solutions
to this problem.

Information : Delphi 5.01, Sybase ASA 7.0 (with all patches), a stand-alone
sybase database file (.DB) with a log file too (.LOG), ODBC Express
components (HDBC, TOEDATASET).

Basically, i want to SHUT down the Sybase database from within my delphi
application. Right now, my priority is to get this thing working for a
STAND-ALONE mode of installation of Sybase.

From the HELP files, i do know that the following SQL statements MIGHT do
this :
- STOP ENGINE ...
- STOP DATABASE ...

But when i fire these statements using my QUERY component's EXECSQL method,
i get SYNTAX errors.

I CAN, SUCCESSFULLY, run these commands from Interactive SQL of Sybase
though - with no errors.

Thanks,
Adnan.

 

Re:Shutting down Sybase database from Delphi


Quote
Adnan Zaman wrote:
> I have already looked at the archives and so far haven't found any solutions
> to this problem.

> Information : Delphi 5.01, Sybase ASA 7.0 (with all patches), a stand-alone
> sybase database file (.DB) with a log file too (.LOG), ODBC Express
> components (HDBC, TOEDATASET).

> Basically, i want to SHUT down the Sybase database from within my delphi
> application. Right now, my priority is to get this thing working for a
> STAND-ALONE mode of installation of Sybase.

> From the HELP files, i do know that the following SQL statements MIGHT do
> this :
> - STOP ENGINE ...
> - STOP DATABASE ...

> But when i fire these statements using my QUERY component's EXECSQL method,
> i get SYNTAX errors.

> I CAN, SUCCESSFULLY, run these commands from Interactive SQL of Sybase
> though - with no errors.

> Thanks,
> Adnan.

Try using the dbstop utility.
Something like "WinExec(PChar('<asa path>\dbstop.exe')".

hth
Kees de Kooter

Re:Shutting down Sybase database from Delphi


Quote
> Basically, i want to SHUT down the Sybase database from within my delphi
> application.

nativeDB from www.nativedb.com (comps for ASA) has built-in  methods to do
just this.

-Chris

Other Threads