Board index » delphi » 2nd post: Sessions & Passwords

2nd post: Sessions & Passwords

(posted last thursday)

is there an answer to this?  is it just accepted that the passwords are GLOBAL
to the application???

thanks,
dave

=========================

hi all,

i created a DLL for others to use that accesses paradox tables that have
passwords.  however, i find that even if i create a local TSession (as in the
form in the DLL i create a new TSession, and assign it to a local variable)
and call AddPassword.  but i find that the application calling this dll using
the default Session can then open the same tables!  not good.

yes, you can have the dll call AddPassword, and then call RemovePassword, in
each procedure that the dll exports, but for multi-threaded calling
applications, i gather this still wouldn't be sufficient.

isn't there a way to just have local password access??  (ie. local to the
dll).  do i have to create a separate application to get this functionality?
is even that sufficient?

and just to further my understanding, where are the passwords stored?  in the
session, BDE, BDE aliases, ...?

thanks,
dave

 

Re:2nd post: Sessions & Passwords


What was the question.  It does not appear in my news reader.

--
Bill Todd
(Sorry but TeamB cannot answer questions received via email)
(Remove nospam from my email address to contact me for any other reason)

Re:2nd post: Sessions & Passwords


Quote
Bill Todd (TeamB) wrote:

> What was the question.  It does not appear in my news reader.

it was at the bottom (10th line?).  it wasn't attached or anything special.
it's there for me.   anyway....

hi all,

i created a DLL for others to use that accesses paradox tables that have
passwords.  however, i find that even if i create a local TSession (as in the
form in the DLL i create a new TSession, and assign it to a local variable)
and call AddPassword.  but i find that the application calling this dll using
the default Session can then open the same tables!  not good.

yes, you can have the dll call AddPassword, and then call RemovePassword, in
each procedure that the dll exports, but for multi-threaded calling
applications, i gather this still wouldn't be sufficient.

isn't there a way to just have local password access??  (ie. local to the
dll).  do i have to create a separate application to get this functionality?
is even that sufficient?

and just to further my understanding, where are the passwords stored?  in the
session, BDE, BDE aliases, ...?

thanks,
dave

Re:2nd post: Sessions & Passwords


Passwords for Paradox tables are managed at the Session level. Are you sure
that you set the SessionName property of every dataset component in the DLL
to the name you assigned to the SessionName property of the TSession
component? If so the DLL should use a separate session and the passwords
should not be visible to the default session.

--
Bill Todd
(Sorry but TeamB cannot answer questions received via email)
(Remove nospam from my email address to contact me for any other reason)

Re:2nd post: Sessions & Passwords


yes, this worked.  thanks.  i had tried this before, but access seemed to be
available outside the DLL.  however, i think what happened was that i had
opened paradox and entered the password there (i was checking the results) and
it must have made it available then to the BDE in general.  it's all clear to
me now...  ;)

thanks again,
dave

Quote
Bill Todd (TeamB) wrote:
> Passwords for Paradox tables are managed at the Session level. Are you sure
> that you set the SessionName property of every dataset component in the DLL
> to the name you assigned to the SessionName property of the TSession
> component? If so the DLL should use a separate session and the passwords
> should not be visible to the default session.

> --
> Bill Todd
> (Sorry but TeamB cannot answer questions received via email)
> (Remove nospam from my email address to contact me for any other reason)

Other Threads