Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / General / Security / September 2005

Tip: Looking for answers? Try searching our database.

Help!!!

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rick - 22 Sep 2005 14:36 GMT
Hi, all:

 Dev Tool: VB6
 Server: SQL Server 2000.
 Environment: Windows 2000/Windows XP/Windows 2000 Server

 I had an ADO conection to the from a VB Application, wtih this connection
the user could Write/Read data from server and execute stored procedures.

 The connection was made with DSNs(ODBC). The system created the DSNs and
connected to the server. Now, since we discovered that any one ,who had
Office 2000 or XP, could connect to the server and have the same permissions
of the VB appliacation user (through the DSN the sytem created), we decided
to do this:
  1. Use a DSN-less connection
  2. Validade the user with SQL Server authetication(not by the tursted
connection.
  3. Give theses users the same permissions they had before.

Now, the system has a huge number of calls, updates and stored procedures,
my problem is that the system now nevertheless can use simple SQL-transact
staments with no prblem; ADO gives the following message when using stored
procedures:

    "Operation is not Allowed when the Object is closed."

    If the permissions were the problem, I couldn't execute the procedures
in the Query Analyzer using the same connection, UserID and Password I
developed for the VB6 application user.

So, I suspect the problem is not the connection itself, there is something
in my ADO (v 2.5) statement(¿?).

   Here is the stament:

  strDSN_p= "Provider=SQLOLEDB;Persist Security Info=False;Initial
Catalog=MyDB;Data Source=MyServer;User Id=SomeUser;Password=somepassword;"

 cnADO_p.ConnectionString = strDSN_p
 cnADO_p.CursorLocation = adUseClient
 cnADO_p.CommandTimeout = 400
 cnADO_p.ConnectionTimeout = 240
 cnADO_p.Open

where cnADO is an ADO connection object.

Any ideas???  I'm really worried because most of users have Office in their
computers and some them are system engineers in manegement possitions(not in
the computer department!) and data must be protected(DSN connections are
trustless!).

Note: A public permission has been granted to All the stored procedures.

Signature

Rick

Dan Guzman - 25 Sep 2005 18:15 GMT
I doubt this problem is security related.  The problem was most likely
introduced by your switch from ODBC to OLE DB.

Ensure your stored procedures include 'SET NOCOUNT ON'.  This will suppress
DONE_IN_PROC messages that can cause problems with ADO applications and
improve performance as well.

Signature

Hope this helps.

Dan Guzman
SQL Server MVP

> Hi, all:
>
[quoted text clipped - 52 lines]
>
> Note: A public permission has been granted to All the stored procedures.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.