April 1st, 2008, 04:11 AM
Run-time error '20533':Unable to open the database
Any one please help me. How to open a crystal reports file which I have created an MDB file with a password protected. If there is no password protection, then the code which I mentioned below is working fine. If I set a password then it is giving error.
Run-time error '20533'
Unable to open the database
Please help me in this regarding.
The connection string(G_CnnStr) is
G_CnnStr="Provider = Microsoft.Jet.OLEDB.4.0.1; Jet OLEDD Database password = 'admin';" _
& "DATA SOURCE = " & App.Path & "\DBBackup\PHIMSYS.mdb;"
.Connect = G_CnnStr
.DataFiles(0) = App.Path & "/DBBackup/PHIMSDB.mdb"
.ReportFileName = App.Path & "\Reports\rptCustomerDtl.rpt"
.Formulas(1) = "CompNm='" & G_Comp_Nm & "'"
.Formulas(2) = "compAddr='" & G_CompFullAddr & "'"
.WindowShowPrintSetupBtn = True
.WindowShowSearchBtn = True
.WindowState = crptMaximized
.Action = 1
Click Here to Expand Forum to Full Width