Link to home
Start Free TrialLog in
Avatar of bitaoo
bitaoo

asked on

Setting Database Password at runtime

Hello friends,

I have another question. I am using Microsoft Access
database, Crystal Report 9 and VB6. I defined a
password for my database, my problem is that when
I want to run the report through my VB6 application
I get this error:
     Logon failed.
     Details: DAO Error Code: 0xbd7
     Source: DAO.Workspace
     Description: Not a valid password.
Please let me know how can I set the password at
run-time for the reports, or how can I solve this
problem.

Thanks for your help,
--Bita
Avatar of Anthony Perkins
Anthony Perkins
Flag of United States of America image

Avatar of bitaoo
bitaoo

ASKER

I know, I made a mistake. :(
Any way if anybody in this group can help me, I
appreciate that. Thanks
Depends on how you are running the report from VB.  If you are using the CrystalReports OCX, you can use:

CrystalReport1.Password = "mypassword"
Avatar of bitaoo

ASKER

Thanks a lot bhess1, but I am using RDC not OCX.
ASKER CERTIFIED SOLUTION
Avatar of Brendt Hess
Brendt Hess
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bitaoo

ASKER

Thanks a lot. You are great. :)
--Bita
I am having this problem now and the link doesn't work.. Anybody know anything about this solution?