[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 228
  • Last Modified:

connect to ms access database with password given with crystal report

i have given a password in ms access database
now i want a report in crystal report
how can i link to access database so that it can automatically take a password in crystal report and didnot ask  a password at runtime
 
0
mgrover30
Asked:
mgrover30
  • 2
  • 2
  • 2
  • +4
1 Solution
 
Ryan ChongCommented:
Open a Password Protected Access Database:
http://www.freevbcode.com/ShowCode.Asp?ID=353
0
 
smeggheadCommented:
Set up an ODBC connection to the access database, providing the password, then just point the CR to the ODBC connection.
0
 
trkcorpCommented:
If you are using the crystal OCX try this prior to printing try this:
Example with ODBC:
With single database use Connect
CrystalReport1.Connect = "DSN = YOURODBC;UID = userID;PWD = pw"
With Multiple DB Use LogOnInfo
CrystalReport1.LogOnInfo(0) = "DSN = YOURODBC;UID = userID;PWD = pw"
Where (0), (1) is for each DB...

Look in your crystal developer help file...
Hope this helps.


0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
trkcorpCommented:
Or w/out ODBC...
try:
CrystalReport1.UserName = "User"
Crystalreport1.Password = "pw"
0
 
mlmccCommented:
listening
0
 
mgrover30Author Commented:
i am using adodb and not odbc also i am using coding to make a connection
0
 
smeggheadCommented:
Then your connection string should look something like..

Provider=Microsoft.Jet.OLEDB.4.0;Password=MyPassword;User ID=MyUsernam;Data Source=Z:\db1.mdb;Persist Security Info=True
0
 
mgrover30Author Commented:
driver i am using is microsoft access driver, not jet.oledb as in this case it asks information about the workgroup
0
 
DanRollinsCommented:
Hi mgrover30,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Refund points and save as a 0-pt PAQ.

mgrover30, Please DO NOT accept this comment as an answer.
EXPERTS: Post a comment if you are certain that an expert deserves credit.  Explain why.
==========
DanRollins -- EE database cleanup volunteer
0
 
kodiakbearCommented:
Moving to the paq

kb
Experts Exchange Moderator
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
  • 2
  • +4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now