Home DADE

RB Strange Problem (Located !!)

edited November 2002 in DADE
Hello Jim

I've found out was is wrong and the "List Index Out of Bounds (1)" error
message crashed the DADE query. The problem is located in the the unit
"daDOA.Pas" and especially inside the "procedure
TdaDOASession.GetDatabaseNames(aList: TStrings);". In my New PC I've
installed the Oracle Client and created ONLY ONE (1) OracleAliasServiceName
(Called "LIMS-Server"). In my Application I use TWO (2) TOracleSessions
(First is called "MainSession" and the Second is called "ComSession") which
are both using the very same and unique OracleAliasServiceName
"LIMS-Server". So in order to make my self clearer let me layout the code :

"procedure TdaDOASession.GetDatabaseNames(aList: TStrings);
var
liIndex: Integer;
begin

{call inherited to build list of available TOracleSession components}
inherited GetDatabaseNames(aList);

{call utility routine in OracleCI unit}
BuildOracleAliasList;

// In my case the aList contains two items the : aList[0]='MainSession' and
aList[1]='ComSession' !!!!
// The OracleAliasList contains one item the :
OracleAliasList[0]='LIMS-Server' !!!!

{assign the strings, do not use aList.Assign() because aList.Objects array
will get cleared}

for liIndex := 0 to aList.Count - 1 do // for liIndex := 0
to 1 do
aList[liIndex] := OracleAliasList[liIndex]; // HERE IT CRASHES
SINCE THERE IS NOT OracleAliasList[1] !!!!

// For now I've blocked the whole procedure by using the code : "for
liIndex := 0 to aList.Count - 1 do aList[liIndex] := OracleAliasList[0];"
// but the proper correction must be done by you (DM) !!

end; {procedure, GetDatabaseNames}"

I can't see the logic where "x" TOracleSessions should have Exactly "x"
OracleServiceAliasNames; this isn't the real conditions.

So as you can see when I runned my application onto a pc with more than two
OracleServiceAliasNames everything worked fine but failed if I runned it
onto a pc with Only One OracleServiceAliasName; that gave the "Phantom"
caracteristic to that Error.

Please check it and if possible e-mail me as soon as possible the corrected
daDOA.Pas, since my clients are getting very anxious.

Looking forward for your reply


--
Best Regards

G.MYTSKIDIS
MYTSKIDIS_G@GI-NET.GR

Comments

This discussion has been closed.