Weird Behavior on connecting

T

Tom Davey

Hello,
Using a simple, barebones .NET 2.0 application (C#), I am trying to connect
to a simple encrypted Access 2007 database in the same directory, like so...

oleMyDbConnection = new System.Data.OleDb.OleDbConnection();
oleMyDbConnection.ConnectionString =
"Provider=Microsoft.ACE.OLEDB.12.0;Jet OLEDB:Database Password=abc;Data
Source=TestDatabase.accdb;Persist Security Info=True";

MyAdapter = new System.Data.OleDb.OleDbDataAdapter();
MyAdapter.SelectCommand = new OleDbCommand("SELECT MyField FROM
MyTable", oleMyDbConnection);

// Try to connect to the database...
MyAdapter.Fill(ds_myDataSet);

When I run it on all Vista machines, it connects perfectly. When I run it on
XP machines, about 90% of machines correctly allow the connection, while
another 10% issue the error "Not a valid password". On these machines, if I
use the same database without a password on the database, it actually
connects (go figure). Users have reported that before September or so, it
ran on their machines, but now it issues the "Not a valid password"
Exception (i.e. an oleDBException). I wonder if some update in XP has messed
this up. This code has run without problem for four years. Now, all of a
sudden, I have an ever-increasing number of users who cannot connect to the
database. Does anyone have any ideas as to what is going on, and even more
importantly, how to fix it?
Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top