Solved

connect to ms access database with password given with crystal report

Posted on 2002-03-14
10
218 Views
Last Modified: 2012-05-04
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
Comment
Question by:mgrover30
  • 2
  • 2
  • 2
  • +4
10 Comments
 
LVL 49

Expert Comment

by:Ryan Chong
ID: 6864192
Open a Password Protected Access Database:
http://www.freevbcode.com/ShowCode.Asp?ID=353
0
 
LVL 10

Expert Comment

by:smegghead
ID: 6864332
Set up an ODBC connection to the access database, providing the password, then just point the CR to the ODBC connection.
0
 
LVL 4

Expert Comment

by:trkcorp
ID: 6864984
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
 
LVL 4

Expert Comment

by:trkcorp
ID: 6865047
Or w/out ODBC...
try:
CrystalReport1.UserName = "User"
Crystalreport1.Password = "pw"
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 6867918
listening
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:mgrover30
ID: 6896111
i am using adodb and not odbc also i am using coding to make a connection
0
 
LVL 10

Expert Comment

by:smegghead
ID: 6896128
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
 

Author Comment

by:mgrover30
ID: 6904841
driver i am using is microsoft access driver, not jet.oledb as in this case it asks information about the workgroup
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7618297
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
 
LVL 1

Accepted Solution

by:
kodiakbear earned 0 total points
ID: 7665735
Moving to the paq

kb
Experts Exchange Moderator
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now