Kbase P115258: Error "Unknown Database Connector Error" when attempting to view a report via the Crystal RDC
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  4/14/2006 |
|
Status: Unverified
FACT(s) (Environment):
Progress 9.1D
Progress 9.1E
OpenEdge 10.x
Crystal Reports 9
Crystal Reports 11 (XI)
Windows
SYMPTOM(s):
Using Crystal Reports ActiveX Viewer control to display reports in 4GL
Using ConnectionProperties collection of the Crystal Report object to modify the report connection settings
Trying to set User ID for the ODBC connection via the User property of ConnectionProperties
Code Sample :
chConnProps = chReport:Database:Tables(1):ConnectionProperties.
chReport:Database:Tables(1):DLLName = "crdb_odbc.dll".
chConnProps:DeleteAll.
chConnProps:ADD("DSN", "<ODBC DSN Name>").
chConnProps:ADD("User", "<User ID>").
chConnProps:ADD("Password", "<Password>").
Crystal error message is displayed when attempting to load the report
Crystal Reports 9 error:
Crystal Report Viewer
Not supported.
Crystal Reports XI error:
Crystal Report Viewer
Unknown Database Connection Error
Report is not displayed in the Viewer control
User ID is not stored in the ODBC DSN used by the report to connect to the database
CAUSE:
User is not a valid member of the ConnectionProperties collection. The correct setting is User ID. As no User ID was stored in the ODBC DSN and User is not valid, no username was being sent making connection to the database impossible.
FIX:
Option #1
Save a username in the ODBC DSN
Option #2
Modify the code to set User ID instead of User:
chConnProps = chReport:Database:Tables(1):ConnectionProperties.
chReport:Database:Tables(1):DLLName = "crdb_odbc.dll".
chConnProps:DeleteAll.
chConnProps:ADD("DSN", "<ODBC DSN Name>").
chConnProps:ADD("User ID", "<User ID>").
chConnProps:ADD("Password", "<Password>").
Refer to solution P55350 for a full code sample.