Microsoft Developer Network > 포럼 홈 > Visual Basic General > VB/SQL Server 2005 connection string, Windows authentication
질문하기질문하기
 

답변됨VB/SQL Server 2005 connection string, Windows authentication

  • 2006년 11월 15일 수요일 오전 6:53mruniqueid 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    I have an old Word 2000 macro (VB6 script).  It connected to Server 2000 database using server authentication.

    Now I want to connect to a Server 2005 db, using Windows authentication if possible.  The old string that worked is:

    Provider=SQLOLEDB;Data Source='(local)';Initial Catalog='<catalog name>';User ID='sa';Password='<sa's password>'

    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.

    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 www.connectionstrings.com and it's just a bit sparse on details...

답변

  • 2006년 11월 15일 수요일 오전 9:59weirdbeardmt 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨

    You should be able to replace it with:

     

    Provider=SQLOLEDB;Data Source='(local)';Initial Catalog='<catalog name>';Integrated Security = SSPI;

모든 응답

  • 2006년 11월 15일 수요일 오전 9:59weirdbeardmt 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨

    You should be able to replace it with:

     

    Provider=SQLOLEDB;Data Source='(local)';Initial Catalog='<catalog name>';Integrated Security = SSPI;