Board index » delphi » getting database response

getting database response


2005-03-07 07:07:53 PM
delphi119
Hi everybody,
Does anybody know how can I get the database engine response to an
INSERT or UPDATE sql command?
I'm using mysql 4.1.7 with corelab dbexpress driver.
thanks very much.
pedro.
 
 

Re:getting database response

Quote
Does anybody know how can I get the database engine response to an
INSERT or UPDATE sql command?

I'm using mysql 4.1.7 with corelab dbexpress driver.
What "reponse" are you looking for?
--
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server
Upscene Productions
www.upscene.com
 

Re:getting database response

if you update for example a row in a table in the mysql client "Control
Center", this application returns :
"Query OK, 1 row affected (0.16) sec"
is this a response of mysql engine? could I manage it?
thanks
Martijn Tonies escribi?
Quote
>Does anybody know how can I get the database engine response to an
>INSERT or UPDATE sql command?
>
>I'm using mysql 4.1.7 with corelab dbexpress driver.


What "reponse" are you looking for?


 

Re:getting database response

Quote
if you update for example a row in a table in the mysql client "Control
Center", this application returns :

"Query OK, 1 row affected (0.16) sec"

is this a response of mysql engine? could I manage it?
The "ok" is an indicator that the query worked. A non working
query would raise an Exception in Delphi.
The "row affected" is returned from MySQL and can be
acquired (if everything is correct in the driver) via the
RowsAffected property and the 0.16 sec is probably
a thing measured at the client side.
--
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server
Upscene Productions
www.upscene.com
 

Re:getting database response

thanks for your help martin.
Martijn Tonies escribi?
Quote
>if you update for example a row in a table in the mysql client "Control
>Center", this application returns :
>
>"Query OK, 1 row affected (0.16) sec"
>
>is this a response of mysql engine? could I manage it?


The "ok" is an indicator that the query worked. A non working
query would raise an Exception in Delphi.

The "row affected" is returned from MySQL and can be
acquired (if everything is correct in the driver) via the
RowsAffected property and the 0.16 sec is probably
a thing measured at the client side.


 

Re:getting database response

Quote
The "ok" is an indicator that the query worked. A non working
query would raise an Exception in Delphi.
How do we catch the exception of this response in Delphi ?
eg.
try
except
end;
Can you post sample code in the TRY part ?