Paradox Community

Items in pnews.paradox-programming

Subject:Re: Sessions
Date:24 Sep 2023 22:31:24 -0400
From:"Kevin Zawicki" <numberjack@wi.rr.com>
Newsgroups:pnews.paradox-programming

A Session is a channel to the BDE. You can have multiple channels, and one
is opened as the default session when Paradox starts.
The default session can be accessed (settings) by the GUI interactively or
with OPAL, non default sessions can only be accessed by OPAL.

Some things are unique to that session, existing only in the session set
in, passwords, aliases, etc.

I think what you describe is true.


IMO, 99% of the time the use a of a non default session is not needed. I
have seen apps codes to use elaborate sessions where it was not needed.

It can be used to issue passwords not accessible to the main session, etc.
But since table level passwords are not secure... not sure if it is worth
it.


>
More thinking
I open a form and add necessary passwords to access tables

I run a method and add password(s), then when the method finishes I remove
all passwords.
<

In what you describe using the default session (which you do not have to
open) is almost the same.

But, ff you close a non default session, it relinquishes (I think) all its
passwords and aliases, no need to know what was set and not set.


>>
If I remover all passwords now the form is affected; true?

It would seem to me that if running a separate method requires its own passwords
then that is when I should add a session so I do not affect other passwords
already established.
<<
Yes, but I am not exactly sure what you mean by "running a separate method
requires its own passwords"?



Peter <peterspammenot@whiteknight.email> wrote:
>Whenever adding passwords I have always used
>var ses  session endvar
>ses.open()
>ses.addPassword()
>
>I got that from some help example and now I am wondering why a session 
>needs to be opened.
>
>More thinking
>I open a form and add necessary passwords to access tables
>
>I run a method and add password(s), then when the method finishes I 
>remove all passwords.
>
>If I remover all passwords now the form is affected; true?
>
>It would seem to me that if running a separate method requires its own 
>passwords then that is when I should add a session so I do not affect 
>other passwords already established.
>
>Do I have this right?


Copyright © 2004 thedbcommunity.com