Only sa Connects using SQLOLEDB provider 
Author Message
 Only sa Connects using SQLOLEDB provider

 The code below seems to work only when the login Id is "sa".  I am not able
to get a connection with a regular user.  The server in question has only
users authenticated through NT.  So, technically, "sa" shouldn't be able to
log in from a client, since we have no NT user called "sa".

The user I am trying to connect with has full permissions (dbo) in the pubs
database.   Those permissions are by way of an NT Group mapped to a db role.
By the way, the exact same situation occurs when going through Crystal
Reports using Server Type:

OLEDB - SQLOLEDB - Microsoft OLE DB Provider for SQL  Server

Only "sa" can get a connection.

Anyone have an idea what the solution is to this security/connectivity
issue?

The code:

(Extracted from Otey & Conte's SQL Server 7 Developer's Guide,
Osborne/McGraw Hill)

    Dim cn As New ADODB.Connection

    ' Use the global connection object - cn
    ' Connect using the OLE DB provider for SQL Server - SQLOLEDB
    cn.ConnectionString = "PROVIDER=SQLOLEDB" & _
        ";SERVER=" & txtServer & _
        ";UID=" & txtLoginId & _
        ";PWD=" & txtPassword & _
        ";DATABASE=pubs"
    cn.Open
    cn.Close



Sun, 16 Jun 2002 03:00:00 GMT  
 Only sa Connects using SQLOLEDB provider
Hi,I think this question may to set the permission in SQL Server.
You can add one new Login in the SQL Server.And you can set this login
in the system role.
Jack.K


Mon, 17 Jun 2002 03:00:00 GMT  
 Only sa Connects using SQLOLEDB provider
You could try the following:

strConn = "Provider=SQLOLEDB.1;
                Integrated Security=SSPI;
                Persist Security Info=False;
                Initial Catalog=PUBS;
                Data Source=SERVER"

___________________________________



Quote:
> The code below seems to work only when the login Id is "sa".  I am not
able
> to get a connection with a regular user.  The server in question has only
> users authenticated through NT.  So, technically, "sa" shouldn't be able
to
> log in from a client, since we have no NT user called "sa".

> The user I am trying to connect with has full permissions (dbo) in the
pubs
> database.   Those permissions are by way of an NT Group mapped to a db
role.
> By the way, the exact same situation occurs when going through Crystal
> Reports using Server Type:

> OLEDB - SQLOLEDB - Microsoft OLE DB Provider for SQL  Server

> Only "sa" can get a connection.

> Anyone have an idea what the solution is to this security/connectivity
> issue?

> The code:

> (Extracted from Otey & Conte's SQL Server 7 Developer's Guide,
> Osborne/McGraw Hill)

>     Dim cn As New ADODB.Connection

>     ' Use the global connection object - cn
>     ' Connect using the OLE DB provider for SQL Server - SQLOLEDB
>     cn.ConnectionString = "PROVIDER=SQLOLEDB" & _
>         ";SERVER=" & txtServer & _
>         ";UID=" & txtLoginId & _
>         ";PWD=" & txtPassword & _
>         ";DATABASE=pubs"
>     cn.Open
>     cn.Close



Mon, 17 Jun 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. can't connect to sql server using sa

2. using SQLOLEdb provider in Crystal Reports

3. SQLOLEDB as Provider for ADO Connection

4. ADO error with Provider=SQLOLEDB

5. Network Address/Location properities in SQLOLEDB provider

6. Datatypemapping between SQL Server and SQLOLEDB Provider

7. SQLOLEDB Provider - How form a connection string??

8. Provider SQLOLEDB.1 does not return error in some cases

9. regional settings prob with ADO SQLOLEDB provider

10. Providers SQLOLEDB versus DSN

11. Datatypemapping between SQL Server and SQLOLEDB Provider

12. Network Address/Location properties in SQLOledb provider

 

 
Powered by phpBB® Forum Software