Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 4 of 4 total |
ServerEngineServerSessionEvent ? |
Tue, May 31 2011 5:25 AM | Permanent Link |
IQA | Hi Tim,
Is there an equivalent in TEDBEngine to get the Server details in a TListItem? For example in DBISAM you might use... void __fastcall TForm1::DBISAMEngine1ServerConnect(TObject *Sender, bool IsEncrypted, const AnsiString ConnectAddress, TObject *&UserData) { TListItem *ListItem; ListItem = ListView1->Items->Add(); ListItem->Caption = ConnectAddress; ListItem->SubItems->Add("N/A"); UserData = ListItem; } //--------------------------------------------------------------------------- Any ideas for something with TEDBEngine, I'm sure I'd have to use: ServerEngineServerSessionEvent(TObject *Sender, TEDBServerSessionEventType EventType, const TEDBServerSession &Session, TObject *&UserObject) But how to assign the list to it is the question. Thanks, Phil. |
Tue, May 31 2011 5:37 AM | Permanent Link |
IQA | void __fastcall TMain::ServerEngineServerSessionEvent(TObject *Sender, TEDBServerSessionEventType EventType, const TEDBServerSession &Session, TObject *&UserObject)
{ /* enum TEDBServerSessionEventType { seOpen, seConnect, seLogin, seLogout, seDisconnect, seClose } */ TListItem *ListItem; if (EventType == Edbsocket::seConnect) { ListItem = SessionsListView->Items->Add(); ListItem->Caption = Session.ID; ListItem->SubItems->Add(Session.Address); ListItem->SubItems->Add(Session.Description); ListItem->SubItems->Add(DateTimeToStr(Now())); UserObject = ListItem; } } |
Tue, May 31 2011 4:18 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Philip,
Only one change: if (EventType == Edbcomps::seConnect) <<<<<<<<<<<< Here the enumeration is declared in the edbcomps header, not the edbsocket header. -- Tim Young Elevate Software www.elevatesoft.com |
Tue, May 31 2011 9:28 PM | Permanent Link |
IQA | Hi Tim,
I had to use 'Edbcomps::seConnect' for that line (not for any others I added like seDisconnect) cause that particular one conflicted with a 3rd party component, so I had to differentiate it. Also the enum section at the top was just in a comment tag so I could easily see the options. Cheers, Phil. |
This web page was last updated on Saturday, April 27, 2024 at 08:52 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |