how to pass a password protected .mdb datasource to crystal reports
Ad you can all guess from this post, i'm still drowning in crystal reports.I've looked everywhere on how to do this, but can't figure it out to save my life.
How do you connect a Crystal Report Viewer to a password protected .mdb file?
For example, here's my connection string:
Code:
gconDatabase.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDatabasePath & ";" & _
"Persist Security Info=False;" & _
"Jet OLEDB: Database Password=" & gcDatabasePassword & ";"
now when I attempt this:
Code:
Dim rpt0001 As New ReportDocument()
Dim tbCurrent As CrystalDecisions.CrystalReports.Engine.Table
Dim tliCurrent As CrystalDecisions.Shared.TableLogOnInfo
Try
rpt0001.Load("..\sts_rpt0001.rpt")
rpt0001.SetDataSource(gconDatabase)
crv01.ReportSource = rpt0001
Catch Exp As LoadSaveReportException
MsgBox("Incorrect path for loading report.", _
MsgBoxStyle.Critical, "Load Report Error")
Catch Exp As Exception
MsgBox(Exp.Message, MsgBoxStyle.Critical, "General Error")
End Try
it brings up a dialog box asking me the database location, user id and password etc..........
please help (says begging on his kees without any hair left):(