ADO and integrated security with SQL server

ADO and integrated security with SQL server

Post by Robert Milmin » Wed, 12 Jun 2002 07:38:23



Is there a way to get ADO to request the domain, username
and password as part of the integrated security login with
SQL server?  If I have a user trying to connect from home,
the login used on their home computer won't be in our
network, and so integrated security will fail.
I've seen this behaviour in such things as directory
shares, where it will ask for a user name and password if
the current login on the machine doesn't have the rights
to access the share.

Robert Milmine

 
 
 

ADO and integrated security with SQL server

Post by Peter Wu [MSF » Wed, 12 Jun 2002 11:35:49


Quote:>Is there a way to get ADO to request the domain, username
>and password as part of the integrated security login with
>SQL server?  If I have a user trying to connect from home,
>the login used on their home computer won't be in our
>network, and so integrated security will fail.
>I've seen this behaviour in such things as directory
>shares, where it will ask for a user name and password if
>the current login on the machine doesn't have the rights
>to access the share.

Do you mean such ConnectionString?

Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=Northwind;Data Source=(local)

If I misunderstood you, please elaborate more on what you're going to do. I
might not have got at you well.

--
Peter Wu
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.

 
 
 

ADO and integrated security with SQL server

Post by Robert Milmin » Wed, 12 Jun 2002 22:53:48


I'll do this in steps.

1) try to connect using a similar string to the one you
gave.
2) Login fails -- person isn't on our internal network,
using VPN.
3) Allow the person to give a user name and password, but
have them give their internal network username and
password, along with the domain name their user is in.
4) have this validated against the network within SQL
server as if they had actually succeded in having step one
work.

Is this possible?

Thanks,
Robert Milmine

Quote:>-----Original Message-----
>>Is there a way to get ADO to request the domain,
username
>>and password as part of the integrated security login
with
>>SQL server?  If I have a user trying to connect from
home,
>>the login used on their home computer won't be in our
>>network, and so integrated security will fail.
>>I've seen this behaviour in such things as directory
>>shares, where it will ask for a user name and password
if
>>the current login on the machine doesn't have the rights
>>to access the share.

>Do you mean such ConnectionString?

>Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist
Security
>Info=False;Initial Catalog=Northwind;Data Source=(local)

>If I misunderstood you, please elaborate more on what

you're going to do. I

- Show quoted text -

Quote:>might not have got at you well.

>--
>Peter Wu
>Microsoft Corporation

>This posting is provided "AS IS" with no warranties, and
confers no rights.

>.

 
 
 

ADO and integrated security with SQL server

Post by Peter Wu [MSF » Thu, 13 Jun 2002 13:46:19


Quote:>I'll do this in steps.

>1) try to connect using a similar string to the one you
>gave.
>2) Login fails -- person isn't on our internal network,
>using VPN.

VPN could be a problem.

Quote:>3) Allow the person to give a user name and password, but
>have them give their internal network username and
>password, along with the domain name their user is in.
>4) have this validated against the network within SQL
>server as if they had actually succeded in having step one
>work.

--
Peter Wu
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.

 
 
 

1. How to connect to SQL Server through ADO (SOL Server uses Integrated Security)

Hi, everyboday!  Please help me!

  I  have the following error when I run the asp page in which I call COM
component. This COM component accesses the SQL server through ADO.

  The error is:
  pubserver.titleupdate.Post error '80004005'
[Microsoft][ODBC SQL Server Driver][DBNMPNTW]ConnectionOpen (CreateFile()).

The SQLServer Security is configured as Integrated Securtiy. The user
account, admin, is assigned as privilege "sa" using SQL Server Security
Manager.
The SQLServer sits in different machine from the IIS. The SQLServer used
Named Pipe protocol.


<%
Set obj = Server.CreateObject("pubserver.titleupdate")
strtitle = "BU1032"
amount = 1
strdsn = "tryjiangsu"
id="admin"
pwd="author"
'call the COM component
result = obj.Post(strtitle,amount,strdsn,id,pwd)
%>

Com component written in VB5:

    Public Function Post( ) As String
    On Error GoTo ErrorHandler
    ' obtain the ADO environment and connection
    Dim adoConn As New ADODB.Connection
    Dim varRows As Variant

    adoConn.ConnectionString = "driver={SQL
Server};server=140.184.132.199;uid=admin;pwd=author;database=pubs"
    adoConn.ConnectionTimeout = 60
    adoConn.Open

    ' update the price
    Dim strSQL As String
strSQL = "UPDATE titles SET price = price + " + Str$(amount) + " WHERE
title_id ='" + title + "'"
    adoConn.Execute strSQL, varRows
  ...

 If I use the Standard Security of SQL Server and user ID as "sa", password
as "",   everything is fine.

2. DW Top 5

3. This is driving me nuts!

4. ADO connection to SQL Server 7.0 using integrated security

5. Essbase Calculator cache

6. How to integrate Access application security with a SQL Server security

7. Oracle Lite consolidator

8. XMLBulkLoad Works with integrated security, fails with SQL Server security

9. COM+ and SQL Server; COM+, SQL Server, and Integrated Security; Integrated Security [Solved :-)]

10. NT Integrated Security Without SQL Security Manager ?

11. ODBC and MS/SQL Server Integrated Security

12. IIS and SQL SERVER connection-integrated security