EPgError
EPgError
Hi there,
I would like to catch EPgError but I can't find which unit I have to add into the uses.
I bought a licence wilthout the source code. Is this possible ?
Otherwise how can I treat the EPgError ?
Thank by advance, Paul
ps: I'm programing with delphi 6
I would like to catch EPgError but I can't find which unit I have to add into the uses.
I bought a licence wilthout the source code. Is this possible ?
Otherwise how can I treat the EPgError ?
Thank by advance, Paul
ps: I'm programing with delphi 6
Hello.
The default path to PgError.dcu is (your system drive):\Program Files\Devart\PgDac for Delphi 6\Lib, if you install PgDac in another dir, search PgError.dcu in (your instal pgDac directory)/lib
Please check if path to the PgDAC library is available in
delphi->tools->Environment Options->Library->Library Path
....;:\Program Files\Devart\PgDac for Delphi 6\Lib;:\Program Files\Devart\PgDac for Delphi 6\Bin
if this path doesn't exist it is necessary to reinstall PgDAC or add this path manually
The default path to PgError.dcu is (your system drive):\Program Files\Devart\PgDac for Delphi 6\Lib, if you install PgDac in another dir, search PgError.dcu in (your instal pgDac directory)/lib
Please check if path to the PgDAC library is available in
delphi->tools->Environment Options->Library->Library Path
....;:\Program Files\Devart\PgDac for Delphi 6\Lib;:\Program Files\Devart\PgDac for Delphi 6\Bin
if this path doesn't exist it is necessary to reinstall PgDAC or add this path manually
Thank again alex for your prompt reply
We bougth "dbExpress Driver for PostgreSQL" not the "Delphi data access components".
In delphi->tools->Environment Options->Library->Library Path,
I added "C:\Program Files\DBxPgSQL\Source"
It contains
CRDbxDesign.pas
CRSQLConnection.pas
DBXDevartPostgreSQL.pas
DriverOptions.pas
but I can't find the PgError.dcu file into my Devart\DbxPgSQL directory.
So I installed the pgDAC trial version just to be able to put pgError in my uses. This worked.
With this code when I run the program through Delphi, the IDE raises 3 exceptions
1- EpgError : Database does not exists
2- EpgError : Database does not exists
3- EDatabaseError : Database does not exists
then the debugger go into the except section and show the message
How can I catch the EPgError in order tobe able to retrieve the ErrorCode ?
We bougth "dbExpress Driver for PostgreSQL" not the "Delphi data access components".
In delphi->tools->Environment Options->Library->Library Path,
I added "C:\Program Files\DBxPgSQL\Source"
It contains
CRDbxDesign.pas
CRSQLConnection.pas
DBXDevartPostgreSQL.pas
DriverOptions.pas
but I can't find the PgError.dcu file into my Devart\DbxPgSQL directory.
So I installed the pgDAC trial version just to be able to put pgError in my uses. This worked.
Code: Select all
try
SQLConnectionWithWrongSettings.connected := True
except
on E: EPgError do
ShowMessage('It is EPgError: ' + E.ErrorCode + ' - ' + E.Message);
on E: EDAError do
ShowMessage('It is EDAError: ' + IntToStr(E.ErrorCode) + ' - ' + E.Message);
on E: EDatabaseError do
ShowMessage('It is EDatabaseError: ' + E.Message);
on E: Exception do
ShowMessage(E.Message);
end;
1- EpgError : Database does not exists
2- EpgError : Database does not exists
3- EDatabaseError : Database does not exists
then the debugger go into the except section and show the message
Code: Select all
'It is EDatabaseError: ' + E.Message'
Hi Alex,
Which release of Delphi were you using while investigating the problem ?
I use delphi 6 which include an old release of DBXpress.
I do not have the DBXcommon the only units I have are
DBXpress,
DBXpressWeb
Update the DBXpress components does not seems a safe way for us. (I'm not even sure that this is possible, these components are installed with delphi..)
What do you suggest ?
Which release of Delphi were you using while investigating the problem ?
I use delphi 6 which include an old release of DBXpress.
I do not have the DBXcommon the only units I have are
DBXpress,
DBXpressWeb
Update the DBXpress components does not seems a safe way for us. (I'm not even sure that this is possible, these components are installed with delphi..)
What do you suggest ?