Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 2005 > Pro Visual Basic 2005
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old April 14th, 2010, 01: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?
Reply With Quote
  #2 (permalink)  
Old April 22nd, 2010, 05:32 PM
Authorized User
Points: 51, Level: 1
Points: 51, Level: 1 Points: 51, Level: 1 Points: 51, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2010
Posts: 13
Thanks: 0
Thanked 1 Time in 1 Post
Default

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>"
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 09:27 AM



All times are GMT -4. The time now is 10:12 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.