Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access 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 June 30th, 2006, 01:24 AM
Authorized User
 
Join Date: Jun 2006
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Annoying password prompts using ODBC to DB2

Hello from Down Under,

Searching all over the net has lead me here and am hoping the guru's on this forum can help.

I have MS Access as the front end with reports, queries, etc connecting via ODBC to tables in DB2. Whenever opening the DB2 tables from Access I get a prompt for a username and password again and again, more so for the larger tables. Weird. This gets frustrating especially when running a macro for a report with multiple queries accessing multiple tables.

I have tried defining the username and password within the DSN which fills in my username at the prompt but I still have to enter a password. I've read about programmatically defining the username and password but I wanted to keep the design as simple as possible. (You guessed it, I'm not a programmer)

Also tried re-linking the tables and ticking the 'Save password' option. This works at first but as soon as I close the database or leave it for a while it comes up with ODBC call failures when I try open it again. :o( This happens to my colleagues as well so it's not just me.

When I access the DB2 tables using Quest Central, I only ever get prompted once for the password and can query the tables successfully so I doubt it's a permission problem at the DB2 level. I only use Access to extract data from DB2 for reports, not make any updates or changes.

Any suggestions greatly appreciated.


Cheers,
Dustin (d-fxt)


Other info:
O/S: Windows XP Pro
Application: MS Access 2003
DB2: IBM DB2 Universal Database 7.2 hosted on AIX
 
Old June 30th, 2006, 07:03 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

There are 4 things you can do that I can think of:

1. Pass the username and password in each call. You can do this by storing the username and password in a local table and using a password mask on that field so people can't read your system password. Then open a hidden form and take the data from the form each time you need it. Better still, create a user that only has read access to the back end, and then it really won't matter if they see it. Also make the table hidden.

2. When the database opens, prompt the user for the username and password to the back end, and then store these in a hidden table/form, and take the username and password from the hidden form for each call.

3. Since this is an OLAP front end, do what I do on my OLAP Access apps: Pull ALL the data you will need in one pull when the database opens and store it in local tables. Then do all the rest of your work locally. This can bloat the front end, but if it doesn't go more than 100MB or so, the users won't really see a huge problem. Load might take 20 seconds.

4. Permanently link the front end to the back end. Then all the rest of your functions are to "locaL' tables, so no username and password are required. I do this as well, but mostly for apps where the user is changing data on the back end. The user will only be prompted once for username and password.

Does this help?


mmcdonal
 
Old July 1st, 2006, 08:18 PM
Authorized User
 
Join Date: Jun 2006
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Some good ideas.
Thanks mmcdonal.
Option 3 sounds like the way to go in my case

Cheers mate.
Dustin





Similar Threads
Thread Thread Starter Forum Replies Last Post
Memorise ODBC Username & Password in Access DB Roly Reefer Access VBA 23 January 20th, 2012 02:32 AM
Please help with Annoying error super007 Classic ASP Databases 6 September 26th, 2007 12:56 AM
Frequent prompts 4 password mod_ntml.so in apache urmilasingh J2EE 0 August 4th, 2005 10:50 AM
Small (yet annoying) gap gkirk CSS Cascading Style Sheets 2 June 1st, 2005 04:43 PM
dsn prompts for password femig ASP.NET 1.x and 2.0 Application Design 1 April 14th, 2005 08:12 AM





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