How to connect to MS SQL Server 2000 fron PC running XP Pro

  • Hello all,

    I am new to SQL 2000 and I cannot seem to get the user configured to allow a connection from a PC running XP Pro.

    I have a clean install of Windows Server 2003, SP2, whose IP address is 192.168.1.2. It is not configured for DNS or DHCP as the router does that. The PCs are windows XP Pro and are workgroup not domain

    On the Server 2k3, is a new install of SQL Server 2000, SP3. The SQL server has a database called PMCustomers.

    I created an excel form that at present resides on the Server 2k3 and works great!

    I now need to put the form on the PCs and be able to connect to the database. I have changed the connection in the following code snippet to what I thought was correct:

    ' Create a connection object.

    Dim cnPMCustomers As ADODB.Connection

    Set cnPMCustomers = New ADODB.Connection

    ' Provide the connection string.

    Dim strConn As String

    'Use the SQL Server OLE DB Provider.

    strConn = "PROVIDER=SQLOLEDB;"

    'Connect to the PMCustomers database on the local server.

    'strConn = strConn & "DATA SOURCE=(local);INITIAL CATALOG=PMCustomers;"

    strConn = strConn & "Data Source=192.168.1.2,1433;Network Library=DBMSSOCN;INITIAL CATALOG=PMCustomers;"

    'Use an integrated login.

    strConn = strConn & " INTEGRATED SECURITY=sspi;"

    'Now open the connection.

    cnPMCustomers.Open strConn

    The line of code that is commented out,

    'strConn = strConn & "DATA SOURCE=(local);INITIAL CATALOG=PMCustomers;"

    works great on the server .

    When I try to connect to the database from the PC, I get this message

    Run-time error '-2147467259 (800004005)':

    Login failed for user '(null)'. Reason: not associated with a trusted SQL Server connection

    Can someone help me get the connection fixed...Please.

    Thanks in advance...RTF

  • You need to change your sql server's authentication mode to mixed mode.....

    Go to Server Properties > Security ...Change the authentication mode to SQL Server & Windows...

    --Ramesh


  • You also need to provide a user/password in mixed mode. Without a domain, you would add a "SQL Server Authenticated" login to SQL Server, then use the same name/pwd in the connection string.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply