-
April 1st, 2008, 03:11 AM
#1
Run-time error '20533':Unable to open the database
Hi
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.
Ram
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;"
The Code:
With frmMdi.cryrep
.Reset
.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
End With
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|