Solved

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

Posted on 2003-11-06
5
611 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
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…

777 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