Solved

If Access Database is password protected then how to access it in crystal report in VB?

Posted on 2003-11-06
5
619 Views
Last Modified: 2007-12-19
If Access Database is password protected then how to access it in crystal report in VB?
0
Comment
Question by:sanjusambhe
5 Comments
 
LVL 8

Expert Comment

by:heskyttberg
ID: 9694939
Hi!

You should really consult a book or manual to Crystal Report on this.

Regards
/Hasse
0
 
LVL 6

Accepted Solution

by:
PWinter earned 125 total points
ID: 9696613
Hi.

In VB you should loop through tables in your report and for each table provide the password at the property of "ConnectionProperty".
There are examples at Crystal Report's Developers Help (CrystalDevHelp.chm) under chapter of "How toconnect to a secured Microsoft Access database".

Good Luck.
PW
0
 
LVL 17

Assisted Solution

by:walterecook
walterecook earned 125 total points
ID: 9701240

Here's an example of a password connection using ADO

Set gConn = New ADODB.Connection
gConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & db & ";Jet OLEDB:Database Password=some;"

and one in DAO
Set db = Workspaces(0).OpenDatabase(App.Path & "\someDb.mdb", False, False, ";pwd=somePass")

Hope that helps
Walt
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

830 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