Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA 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 January 2nd, 2008, 11:38 PM
Friend of Wrox
Join Date: Apr 2004
Posts: 204
Thanks: 0
Thanked 0 Times in 0 Posts
Default ADO Connection problem when not logged in as an Ad


Any idea why the following code would work when logged in as a user with
Admin priviledges, but not work when logged in as a user with only normal

This is from a VBA module in an Access 2003 file. The underlying database is
SQL Server 2005 Express. The tables are linked by ODBC using a File DSN I
setup and saved. The ODBC link works always, Admin user or not. It's only
this VBA code with the ADO connection that breaks when a user is not an Admin.
Dim cnxn As New ADODB.Connection
  Dim rsProject As New ADODB.Recordset
DATABASE=MyDatabase; USER=MyUser; PASSWORD=MyPassword;"

Old January 3rd, 2008, 08:43 AM
Friend of Wrox
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts

Are you using Windows NT authentication, or SQL Server authentication? I think the Windows NT authentication will ignore the SQL Server creds you are passing in the string. Did any of that help?


Look it up at: http://wrox.books24x7.com

Similar Threads
Thread Thread Starter Forum Replies Last Post
Add existing AD user to AD group via ADSI? thiazi Classic ASP Basics 0 August 24th, 2007 09:27 PM
problem with changing style when user is logged hertendreef ASP.NET 2.0 Professional 0 February 28th, 2007 06:21 PM
How to ad new record through odbc connection bijunair11 Beginning VB 6 2 September 11th, 2006 08:10 PM
Exclusive ADO Connection bsa Pro VB Databases 1 September 6th, 2004 07:16 AM
Exclusive ADO Connection bsa SQL Server 2000 2 August 24th, 2004 12:10 AM

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