Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pass access database password from vb to crystal when opening .rpt

Status
Not open for further replies.

rowan77

Programmer
Jan 28, 2001
7
0
0
ZA
Hi there
I have an rpt file that is drawing data from an password protected access 2000 database, via ado.

I'm opening the report in vb with the code
rptOne.Action = 1

It works perfectly if the database password is not set.
If I set the database password, I get the error message
"Run-time error '20535':
Error in File C:\ ... .rpt:
Unable to connect: incorrect session parameters."

I've tried setting the password with the code:
rptOne.password = "xyz"
But this makes no difference.

I've tried:
rptOne.connect = "PWD=xyz"

This doesn't help either.
I've been scouring the old postings for 2 days now, and have had no joy, so If anyone can help I will be eternally grateful!

Thanks in advance
Rowan.
 
This works with DAO, give it a shot

CrystalReport1.LogonInfo(0) = "pwd=xyz"

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top