Wednesday, February 15, 2012

error 20534

Hi Everyone,

I am trying to print crystal reports from my VB
program. I have this command in my VB program
CrystalReports1.Action=1. My program is breaking
right here. It is gving me error , Error Detected by
database DLL. Err Msg: 20534. I searched this error
> code in google and saw that I can bypass this errror
> by writing

#Const fDebug = true
Dim logon as integer

On Error GoTo traperror:

With CrystalReport1
.ReportFileName = <path to report file>
logon = .LogOnServer("pdsodbc.dll","<Your
DSN>","","","")
.Action = 1
End With

Traperror:

#If fDebug = true then
If Err.Number = 20534 Then
CrystalReport1.Action = 1
End If
#End If

My program goes in this statement but breaks again
at crystalreport1.action=1. It breaks inside the
trap error label. Please anyone let me know what can
I do to avoid this error.

Any help will be greatly appreciated.

Thanks.Can be caused by a number of things...like ODBC Text Driver in VB6 SP3, like using subreport in your report and not passing login info to subreport, like incorrectly formned parameters, etc.

Given previous experience, I'd bet on a subreport, an incorrectly formed statement passed to .LogonServer, or a dodgy ODBC driver.

You should be using PDB*.DLL for standard (non-SQL) databases, and PDS*.DLL for SQL/ODBC databases....

Dave

No comments:

Post a Comment