db error: workgroup information file is either missing or opened.....

M

mike

i am using ADO with visual c++ to connect to an access
2002 database but can't seem to get the code to work with
a user-level secured database. i can get it to work
without any security one the database...and can also get
it to work with share-level security....however i can't
seem to get the code to connect to a user-level secured
database.

here is my code:

HRESULT dbConnect(bstr_t p_dbLocation)
{....

bstr_t sConString;

sConString = L"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=" + p_dbLocation + ";user
id=ab_user;password=oi34j4j;";

con->Open(sConString, L"", L"", -1);
printf("Connection object created.\n");
hResult=SUCCESS;
.....
}

what am i doing wrong....i am almost sure i set up the
user-level security correctly...it works just fine when i
open up the mdb file directly..(i.e. the login dialog
pops up and lets me in when i enter a correct username
and password)
does the System.mdw file need to be located somewhere
special.....i have it sitting in both the same directory
as the .mdb file and in the
"C:\Documents and Settings\Mike\Application
Data\Microsoft\Access"
directory in windowsXP
 

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