Wrox Programmer Forums
Pro Visual Basic 2005 For advanced Visual Basic coders working in version 2005. Beginning-level questions will be redirected to other forums, including Beginning VB 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro Visual Basic 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 14th, 2010, 12:01 PM
Registered User
Join Date: Apr 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default SQL Windows Authentication

We have done a program to select data and create a text file, it works correctly in our test server.. but the problem is in the production server, We do no have the admin password. We can access the data running a query connecting thru windows authentication, but we want to use the program because it do only that task. If we go directly to the DB it could cause others problems

How can I access the sql DB using Windows authentication via vb 2005 program?
Old April 22nd, 2010, 04:32 PM
Authorized User
Join Date: Jan 2010
Posts: 15
Thanks: 0
Thanked 1 Time in 1 Post

There are couple of ways to do that.

You can use System.Data.Odbc.OdbcConnection with ConnectionString as
"DSN=<odbc DSN Name>"

or use System.Data.SqlConnection with ConnectionString as

"Persist Security Info=true;Integrated Security=SSPI;database=<databasename>;server=<data baseServerName>"

Similar Threads
Thread Thread Starter Forum Replies Last Post
Form Based Authentication instead of Windows authentication ocn BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio 8 January 8th, 2010 07:28 PM
Windows Authentication RiazFarooqui BOOK: Professional Microsoft SQL Server 2008 Reporting Services ISBN: 978-0-470-24201-8 0 November 25th, 2009 04:29 AM
Windows Authentication OrbitalThread .NET Framework 2.0 0 December 5th, 2006 01:57 PM
windows Authentication zee_ahmed2002 Classic ASP Basics 1 August 15th, 2004 08:27 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.