Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread LicensedSessions - next question
Mon, Jan 14 2008 5:16 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

How do I determine that the LicensedSessions has been exceeded. I have the following procedures and what I'd like to do is enhance DuffLogon to notify people if the sessions have been exceeded. Is there a way?

procedure Tdm.TfRSessionLogin(Sender: TObject; var UserName, Password: string; var Continue: Boolean);
begin
Continue:=False;
end;

procedure TLogonForm.ProcessLogon;
var
Cntr: integer;
procedure DuffLogon;
begin
 DoingItMsg.Caption := 'Invalid user ID or password';
 DoingItMsg.Update;
 dm.TfRSession.LoginUser := '';
 dm.TfRSession.LoginPassword := '';
 PW.Text := '';
end;
begin
DoingItMsg.Caption := 'Trying to logon';
DoingItMsg.Update;
try
 dm.TfRSession.LoginUser := UserID.Text;
 dm.TfRSession.LoginPassword := PW.Text;
 dm.TfRSession.Connected := True;
 Users.ParamByName('UserID').AsString := UserID.Text;
 Users.Open;
 Databases.Open;
 if Databases.RecordCount = 1 then begin
  try
   DoTheLogon;
  except
   DoingItMsg.Caption := 'Unable to connect to: ' + Databases.FieldByName('Description').AsString;
   DoingItMsg.Update;
   dm.TfRSession.LoginUser := '';
   dm.TfRSession.LoginPassword := '';
   PW.Text := '';
  end;
 end else begin
  UserName.Caption := '[' + UserID.Text + '] ' + Users.FieldByName('Description').AsString;
  UserName.Update;
  dbList.RowCount := Databases.RecordCount;
  Databases.First;
  Cntr := -1;
  while not Databases.Eof do begin
   inc(Cntr);
   dbList.Cells[0, Cntr] := Databases.FieldByName('Description').AsString;
   dbList.Cells[1, Cntr] := Databases.FieldByName('Name').AsString;
   Databases.Next;
  end;
  dbList.FixedCols := 1;
  dbList.HideColumn(1);
  dbList.AutoFitColumns;
  dbList.FixedRows := 0;
  dbList.Row := 1;
  dbList.Visible := True;
 end;
except
 DuffLogon;
end;
end;

Roy Lambert
Mon, Jan 14 2008 9:44 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< How do I determine that the LicensedSessions has been exceeded. I have
the following procedures and what I'd like to do is enhance DuffLogon to
notify people if the sessions have been exceeded. Is there a way? >>

Look for this error code:

EDB_ERROR_MAXSESSIONS = 504

(from edberror.pas unit)

--
Tim Young
Elevate Software
www.elevatesoft.com

Image