Somethings not liked in TOracleSessionPool

Hi! For begining, I like DOA :)
but I have a logical problem with TOracleSessionPool.

Some words from help
"Declaration
property Sessions: [Index: Integer]: TOracleSession;
Description
This array property contains a session for each connection index. If the connection at this index is currently not being used by a session, the array element will be nil."

I thing its no good :(
see below

procedure TForm1.Button1Click(Sender: TObject);
var OracleSession : TOracleSession;
i: integer;
begin
//Run time create sessions for example 5
for i:=1 to 5 do begin
OracleSession := TOracleSession.Create(self);
with OracleSession do begin
LogonDatabase := 'BASE'; //replace as you need
LogonUsername := 'BASE';//replace as you need
LogonPassword := 'BASE';//replace as you need
Pool := OracleSessionPool1;
Name := 'NewSession'+ inttostr(OracleSessionPool1.count);
LogOn;
end;
end;
// Some application action do something like
OracleSessionPool1.Sessions[3].LogOff;
//after that another application action do something like
if OracleSessionPool1.Sessions[3].Connected then
ShowMessage('Yes, You dont connected now');
// oh sorry, this soo hard for OracleSessionPool1 becose
// OracleSession number 3 is NIL
end;
:(

I hoped use OracleSessionPool as MyPool of Oracle Session for control each of application session.
Is it possible realize on next version?
:confused:

thank you

p/s/ May be rename TOracleSessionPool to TOracleConectionPool :p
 
Thank you very match. I pleasantly that You with understand perceived my wish.
And else I very pleased that users as I, can receive real help.

Sorry for my english :)
 
Back
Top