By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,899 Members | 1,190 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,899 IT Pros & Developers. It's quick & easy.

Connect Crystal Report to Access MDB with security MDW file

P: 8
I'm using VS2010(VB.NET) and Crystal report IX
The report is connected to a MS ACCESS .MDB with a .MDW system database file.
Since I want to dynamically change the database path programmatically, I'm having a hard time figuring out the correct ConnectionInfo settings in viewing the report.
I tried searching on the net but failed to come up with the correct solution.
Below is a sample of my ConnectionInfo code. Appreciate any help or suggestion.

Expand|Select|Wrap|Line Numbers
  1.  
  2. With crConnectionInfo
  3.    .ServerName = "Provider=Microsoft.Jet.OLEDB.4.0;DataSource=D:\Documents\db.mdb;Jet OLEDB:System Database=D:\Documents\CRBSecurity.mdw;User ID=MyUsername;Password=Mypassword;"
  4.    .DatabaseName = "D:\Documents\db.mdb"
  5.    .UserID = "MyUsername"
  6.    .Password = "Mypassword"
  7. End With
  8.  
Mar 4 '15 #1

✓ answered by relicx2004

Problem solved. It turned out to be an easy task.
Changed database connection of the crystal report from DAO to ADO and filled the connection information. Then modified code to:

Expand|Select|Wrap|Line Numbers
  1. With (crConnectionInfo)
  2.     .UserID = "MyMDWWorkgroupUserName"
  3.     .Password = "MyMDWWorkgroupPassword"
  4. End With
  5.  

Share this Question
Share on Google+
1 Reply


P: 8
Problem solved. It turned out to be an easy task.
Changed database connection of the crystal report from DAO to ADO and filled the connection information. Then modified code to:

Expand|Select|Wrap|Line Numbers
  1. With (crConnectionInfo)
  2.     .UserID = "MyMDWWorkgroupUserName"
  3.     .Password = "MyMDWWorkgroupPassword"
  4. End With
  5.  
Mar 6 '15 #2

Post your reply

Sign in to post your reply or Sign up for a free account.