I have problems with connecting MS Access 2000 database protected with password. I have tried to get help with this article: http://support.businessobjects.com/library/kbase/articles/c2010371.asp
but could not get it work...
I have selected OLE DB connection from Desing window and created report without Database password.
Here is my code (I have used that article when creating it):
The code works fine without password. When I'm settin password and running report, I get window "Database login" and it always says "logon failed". If I try to connect database in Desing window, I get error: "Login Failed. Cannot start your application, the workgroup file is either missing or opened exclusively by another user."
Database location have to change when running, and I store right location from textfile.
I am using .NET 2003 and Crystal Report that came with.
And my code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Help from here: http://support.businessobjects.com/library/kbase/articles/c2010371.asp
Dim crtableLogoninfos As New TableLogOnInfos
Dim crtableLogoninfo As New TableLogOnInfo
Dim crConnectionInfo As New ConnectionInfo
Dim CrTables As Tables
Dim CrTable As Table
Dim crReportDocument As New CrystalReport1
'getting database location (like c:\myDatabase.mdb)
'Location is different than what is set in Design window
Dim sr As New System.IO.StreamReader("da
Dim MyDatabase As String = sr.ReadLine()
'Set the ConnectionInfo properties for logging on to
.ServerName = MyDatabase
.UserID = "Admin"
.Password = "MyPassword"
' Set the CrTables to the Tables collection of the report
CrTables = crReportDocument.Database.
'Loop through each table in the report and apply the
For Each CrTable In CrTables
crtableLogoninfo = CrTable.LogOnInfo
nInfo = crConnectionInfo
'Set the viewer to the report object to be previewed.
tSource = crReportDocument
Hope that someone can help me,