Help!!!

From: Rick (Rick_at_discussions.microsoft.com)
Date: 09/22/05


Date: Thu, 22 Sep 2005 06:36:06 -0700

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.

-- 
Rick


Relevant Pages

  • Re: Cross Transactions between ADO & ADO.Net
    ... connection--it thrashes the server unnecessarily and discards useful server ... goes away and quietly reopen the connection when they return. ... > DTC transactions are not only heavy, they might also cause deadlocks due ... We even call ADO ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: accessing data mining model via web/PDA
    ... Is your OPENROWSET clause connecting to a SQL Server 2000 database? ... Is your SQL Server instance running on the same machine as your Analysis ... i need some> help for the connection string, let say to access the> mining model in the AS. ...
    (microsoft.public.sqlserver.datamining)
  • Re: VB Express SQL Express Remote Connection
    ... Yes I can connect using the SQL Server Management Studio Express Tool. ... I changed my connection to exactly what you specified and it connected. ... I can connect and create databases on the Remote Server ...
    (microsoft.public.dotnet.languages.vb)
  • Re: How to Direct connect with ActiveSync
    ... That won't work because you have a connection string that can't be correct. ... You're saying that the database is, but it's not; ... Server 2000, Visual Studio 2008. ... Again sorry if this should be in another form but you say that SQL Server ...
    (microsoft.public.sqlserver.ce)
  • .Net Scalability problem
    ... I finished a Great project using .Net and SQL Server and .Net Mobile ... Million concurrent users ... So I think that the MTC generate concurrent connection and per ...
    (microsoft.public.sqlserver.connect)