J
JRE
I'm building an Access 2000 application connected to a SQL Server 2000
database with DAO and ODBC. I'm trying to have the application control the
SQL Server authentication by logging in to the database as "AppNameAdmin"
and loading a user table. I then find the network username in the table and
get their SQL Server login ID ("AppNameRead" or "AppNameWrite"). Using the
matching SQL Server login, I then link the tables or refresh the table
links.
The problem is that SQL Server Enterprise Manager shows both logins (even
though I previously closed the recordset where I used the "AppNameAdmin"
login (which is read/write). Since the first login allows read/write
permissions (and is persistent) and the second login is "AppNameRead", data
in the tables can still be edited (ignoring the fact that the tables were
linked with "AppNameRead", which has read only permissions).
Is there a programatic way in Access to log off user "AppNameAdmin" after
the user validation and before logging on and relinking the tables with
"AppNameRead"? I've looked high and low... There's a SQL Server stored
procedure to kill a login...but you can't kill your own login.
Any help would be appreciated.
Joe
database with DAO and ODBC. I'm trying to have the application control the
SQL Server authentication by logging in to the database as "AppNameAdmin"
and loading a user table. I then find the network username in the table and
get their SQL Server login ID ("AppNameRead" or "AppNameWrite"). Using the
matching SQL Server login, I then link the tables or refresh the table
links.
The problem is that SQL Server Enterprise Manager shows both logins (even
though I previously closed the recordset where I used the "AppNameAdmin"
login (which is read/write). Since the first login allows read/write
permissions (and is persistent) and the second login is "AppNameRead", data
in the tables can still be edited (ignoring the fact that the tables were
linked with "AppNameRead", which has read only permissions).
Is there a programatic way in Access to log off user "AppNameAdmin" after
the user validation and before logging on and relinking the tables with
"AppNameRead"? I've looked high and low... There's a SQL Server stored
procedure to kill a login...but you can't kill your own login.
Any help would be appreciated.
Joe