TDADBSessionManager bug(s)?

Hi,

Using Delphi 10.3.2, DataAbstract 10.0.0.1457

I’m trying to get the TDADBSessionManager to work without success. No session is added to the DB.
When debugging the code (and looking for the InsertSession command), the only place where InsertSession is called is in the DoReleaseSession method, but DoReleaseSession is never called?

When ClearSessionOnDestroy is True, the destructor raises an error “Schema must be assigned”.

Regards,

Filip.

Hi,

SessionManager.ReleaseSession method is called at deactivation in TRORemoteDataModule.DoOnDeactivate method.

Can you create a simple testcase that demonstrates this issue, pls?
I’ll review and point to any errors in this testcase.

you can drop it to support@ for keeping privacy.

you can use MSSQL (or any other DB) for this testcase.

MSSQL script
CREATE TABLE [dbo].[Sessions] (
	[SessionID] [char] (38) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[Created] [datetime] NULL ,
	[LastAccessed] [datetime] NULL ,
    [Data] [IMAGE] NULL
)
GO

ALTER TABLE [dbo].[Sessions] WITH NOCHECK ADD
	CONSTRAINT [PK_Sessions] PRIMARY KEY  CLUSTERED
	(
		[SessionID]
	)  ON [PRIMARY]
GO

Edit: TDADBSessionManager should be put to server datamodule

Hi Evgeny,

While preparing a testcase I found my mistake about the sessions. I simply forgot to implement the necessary things… (Suggestion: add the SQL statements in the unit uDADBSessionManager to the documentation).

But the bug when putting a TDADBSessionManager persists. Easy to reproduce: create new project, add a datamodule, put a TDADBSessionManager on that datamodule and save. Message “Schema must be assigned” is displayed.
Close the datamodule and try to reopen it. Same message.

Best regards,
Filip.

Hi,

You are right. ClearSessionsOnCreate/ClearSessionsOnDestroy are set to true.
it should check assigned Schema and the try to call ClearSessions.

Thanks, logged as bugs://84212

bugs://84212 got closed with status fixed.