Advertisement

10.05.2007 at 12:08PM PDT, ID: 22875671
[x]
Attachment Details

How to create a trusted SQL Server connection?

Asked by 2addietoo in Windows 2003 Server, MS SQL Server

Tags: , , , ,

Hello All...
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 (with the help of a lot of you guys&gals...THANKS!!), that at rpresent 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 to the following code snippet:
     
' 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 a 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.

AddieStart Free Trial
[+][-]10.05.2007 at 01:54PM PDT, ID: 20025399

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.05.2007 at 02:14PM PDT, ID: 20025512

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.05.2007 at 02:17PM PDT, ID: 20025518

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.11.2007 at 04:51PM PDT, ID: 20062143

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Windows 2003 Server, MS SQL Server
Tags: sql, trusted, connection, server, create
Sign Up Now!
Solution Provided By: 2addietoo
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_1_20070628