VB/SQL Server 2005 connection string, Windows authentication<p>I have an old Word 2000 macro (VB6 script).  It connected to Server 2000 database using server authentication.</p> <p>Now I want to connect to a Server 2005 db, using Windows authentication if possible.  The old string that worked is:</p> <p>Provider=SQLOLEDB;Data Source='(local)';Initial Catalog='&lt;catalog name&gt;';User ID='sa';Password='&lt;sa's password&gt;'</p> <p>Can I use Windows authentication?  If so, what do I use for [User ID] and [Password]?  I tried '' for both and it didn't work.</p> <p>Moreover, where in the world can I find a comprehensive discussion on how to use and setup these blasted connection strings?  I've been to <a title="http://www.connectionstrings.com" href="http://www.connectionstrings.com">www.connectionstrings.com</a> and it's just a bit sparse on details...</p>© 2009 Microsoft Corporation. All rights reserved.Thu, 19 Jun 2008 00:15:52 Z63bd7ea7-7ab2-419c-9ac7-ff19c7d55405http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/63bd7ea7-7ab2-419c-9ac7-ff19c7d55405#63bd7ea7-7ab2-419c-9ac7-ff19c7d55405http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/63bd7ea7-7ab2-419c-9ac7-ff19c7d55405#63bd7ea7-7ab2-419c-9ac7-ff19c7d55405mruniqueidhttp://social.msdn.microsoft.com/Profile/en-US/?user=mruniqueidVB/SQL Server 2005 connection string, Windows authentication<p>I have an old Word 2000 macro (VB6 script).  It connected to Server 2000 database using server authentication.</p> <p>Now I want to connect to a Server 2005 db, using Windows authentication if possible.  The old string that worked is:</p> <p>Provider=SQLOLEDB;Data Source='(local)';Initial Catalog='&lt;catalog name&gt;';User ID='sa';Password='&lt;sa's password&gt;'</p> <p>Can I use Windows authentication?  If so, what do I use for [User ID] and [Password]?  I tried '' for both and it didn't work.</p> <p>Moreover, where in the world can I find a comprehensive discussion on how to use and setup these blasted connection strings?  I've been to <a title="http://www.connectionstrings.com" href="http://www.connectionstrings.com">www.connectionstrings.com</a> and it's just a bit sparse on details...</p>Wed, 15 Nov 2006 06:53:12 Z2006-11-16T03:59:06Zhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/63bd7ea7-7ab2-419c-9ac7-ff19c7d55405#44c013f2-bbba-4afa-8a78-65bcae6230bbhttp://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/63bd7ea7-7ab2-419c-9ac7-ff19c7d55405#44c013f2-bbba-4afa-8a78-65bcae6230bbweirdbeardmthttp://social.msdn.microsoft.com/Profile/en-US/?user=weirdbeardmtVB/SQL Server 2005 connection string, Windows authentication<p>You should be able to replace it with:</p> <p> </p> <p>Provider=SQLOLEDB;Data Source='(local)';Initial Catalog='&lt;catalog name&gt;';Integrated Security = SSPI;</p>Wed, 15 Nov 2006 09:59:36 Z2006-11-16T03:59:06Z