Re: Error Handling Coming Out of a Trigger



Hello Vassiliev,


I tried your suggestion as well but no go on that route either. I am
creating my connections at run-time so what i did was declared a class with
a class function.


type TMyInfoMessageObject = class
class procedure ShowMessage(Connection: TADOConnection;
const Error: Error;
var EventStatus: TEventStatus);
end;

implementation...

class procedure TMyInfoMessageObject.ShowMessage(
Connection: TADOConnection; const Error: Error;
var EventStatus: TEventStatus);
begin
MessageDlg(Error.Description, mtError, [mbOK], 0);
end;


At runtime when the TADOConnection object is created i assigned the class
function like so;

// gets the db connection and tests for connectivity, also catches
Exceptions
function SafeGetDBConnection(var c: TAdoConnection): boolean;
begin
try
c := GetDBConnection; // call out to our dmgrInt unit
c.OnInfoMessage := TMyInfoMessageObject.ShowMessage;
If c.Connected then
result := TRUE
Else
result := FALSE;
except on E: Exception do
result := false;
end;
end;


But i get nothing back. I am just going to go with business rule enforcement
in the front-end, eventually a middle-tier would be nice, and pull as much
as possible out of the database. FYI, i took our Base Form Object and added
Business Rule validation into the Save logic processing. We now eliminated
extraneous trips to the database for both "empty required fields" and "data
range validation checks". The database still has its contraints in place
too...

Thanks,

Brian Hollister

--
Got a big event coming up? Let us
help coordinate your event. For more
visit www.kissemgoodbye.com


.



Relevant Pages

  • Re: How can I open an SQL database and be the only one who has access to it?
    ... you can determine how SS permits access to your server. ... SINGLE_USER allows one user at a time to connect to the database. ... controlled by the termination clause of the ALTER DATABASE statement. ... To allow multiple connections, the database must be changed to ...
    (microsoft.public.data.ado)
  • Re: ORA-12518, 04030 errors after 9i-10G upgrade.
    ... All went ok until users started connecting in 100+ numbers, database is ... set up for dedicated server connections, this was never a problem in 9i. ... This did not solve problems so bounced database and decreased SGA to ... out of process memory errors. ...
    (comp.databases.oracle.server)
  • Re: ORA-12518, 04030 errors after 9i-10G upgrade.
    ... All went ok until users started connecting in 100+ numbers, database is ... set up for dedicated server connections, this was never a problem in 9i. ... out of process memory errors. ... that Oracle is having issues with OS resources. ...
    (comp.databases.oracle.server)
  • Re: ORA-12518, 04030 errors after 9i-10G upgrade.
    ... New server has 6GB ram. ... All went ok until users started connecting in 100+ numbers, database is ... set up for dedicated server connections, this was never a problem in 9i. ... This did not solve problems so bounced database and decreased SGA to ...
    (comp.databases.oracle.server)
  • Re: How to handle large number of users
    ... The client app will work on mobile phones using WinCE and it is just a small app updating some tables in the database on the server. ... use a Database Pooling mechanism, that controlled the number of active connections to the DB server through the pool. ... You are not going to be storing mountains of data, the streams will be small and the data capture should be relatively small (unless you are collecting transaction times, rates, etc). ... Lets assume that your transaction rate for inserting and/or updating the database for the 10K data stream is 100 milliseconds. ...
    (borland.public.delphi.non-technical)