all groups > sql server odbc > march 2004 >
You're in the

sql server odbc

group:

Restricting ODBC access to SQL Server 2000 database


Restricting ODBC access to SQL Server 2000 database JB
3/30/2004 6:39:14 AM
sql server odbc:
Is there a way to restrict an ODBC connection to the
database?
I.E. only allow ODBC access to a database if from a
specific VB application. Do not allow the DSN to connect
using Access, Excel, etc.

Thanks,
Re: Restricting ODBC access to SQL Server 2000 database Michael Otey
3/31/2004 4:59:39 PM
There's no way that I know of to restrict ODBC access per application for
the same user. However, one tact you might consider is not using a DSN in
your VB application. Instead, you could use a DSN-less connection in the VB
application by including the Driver={SQL Server} keyword pair in your
connection string.

Mike O.

[quoted text, click to view]

Re: Restricting ODBC access to SQL Server 2000 database JJ
4/5/2004 9:09:14 AM
Check into application roles.

Create an application role, and only give the app role access to the tables
in the database.

Then you will need to modify your VB app to call sp_setapprole with the
role's name and password, which only your app would know.

The user could still use Access, etc. to connect to the DSN, but they won't
have permission to do anything unless they knew (1) how to call
sp_setapprole and (2) knew the role name and password.

[quoted text, click to view]

AddThis Social Bookmark Button