Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Password protected Access DB (CR in VS.NET 2003)

Status
Not open for further replies.

antijape

Programmer
Jul 5, 2005
2
FI
Hi everyone

I'm using CR in VS.NET 2003 and trying to connect to password protected Access 2000 DB. Programming language is VB.NET. The problem is that I can't submit the DB password at runtime. If I remove the DB password and use only UserID and UserPassword (or remove also the user & password) everything works just fine. I've asked about this problem from several forums and other places but nobody seems to be able to help me... I even downloaded and tried to use the CRAXDRT.dll but can't find the ConnectionProperty -class from it. At desing mode everything works, but when connecting to DB at runtime login windows appears and only asks for the userID and password but not the Jet DB password. I also must change the location of the DB at runtime (which I'm able to do) so I must also be able to submit the Jet DB password at runtime. Please help me on this one. I'm starting to lose my faith...

Dim oCRTab As New CrystalDecisions.Shared.TableLogOnInfo
Dim oCRConn As New CrystalDecisions.Shared.ConnectionInfo
Dim tab As Table
Dim report As New myReport

tab = raportti.Database.Tables("Asiakas")
oCRTab.ConnectionInfo.ServerName = "c:\dbTest\db1.mdb"
oCRTab.TableName = "Asiakas"
oCRTab.ConnectionInfo.UserID = "Admin"
oCRTab.ConnectionInfo.Password = "AdminPass"
tab.ApplyLogOnInfo(oCRTab)

This code works just fine, but where and how should I put the DB password?
 
Thanks lupins for your answer. It seem that the problem that I have can't be solved. I received answer from businessobjects and found out this:

====================
NOTE:

You cannot set a database level password when
using Crystal Reports for Visual Studio .NET 2002 or
2003.
====================

So that's it. Now I have to find a new way to make my reports. ...Boycotting CR since 2005....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top