Skip to Content
0
Former Member
Mar 02, 2010 at 11:31 AM

VerifyDatabase LogOnException InteropServices.COMException (0x80000000)

178 Views

Experts,

On one of our client's machine, upon 'VerifiyDatabase()', the following exception has been thrown

CrystalDecisions.CrystalReports.Engine.LogOnException: Log on failed. ---> System.Runtime.InteropServices.COMException (0x80000000): No error.

at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.VerifyDatabase()

at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.VerifyDatabase()

at CrystalDecisions.CrystalReports.Engine.ReportDocument.VerifyDatabase()

--- End of inner exception stack trace ---

at CrystalDecisions.CrystalReports.Engine.ReportDocument.VerifyDatabase()

....

This works fine on our development machine and on many other customer machines.

The necessary assemblies have been installed on the customer machine using the merge modules with our installer.

Code extraction

ReportDocument RptDoc;

RptDoc.ResourceName = "ReportName.rpt"; // Embedded report file

RptDoc.Load();

RptDoc.SetDatabaseLogon(...);

ConnectionInfo crConnectionInfo = new ConnectionInfo();

crConnectionInfo.ServerName = "Machine
Sql_InstanceName";

crConnectionInfo.DatabaseName = "dbase_sqlServer2005";

crConnectionInfo.UserID = "UserID";

crConnectionInfo.Password = "Password";

foreach (Table crTable in crRptDoc.Database.Tables)

{

TableLogOnInfo crTableLogOnInfo = crTable.LogOnInfo;

crTableLogOnInfo.ConnectionInfo = crConnectionInfo;

crTable.ApplyLogOnInfo(crTableLogOnInfo);

}

RptDoc.DataSourceConnections[0].SetConnection(....);

RptDoc.VerifyDatabase(); // ==> Fails here

Additional information :

- This report connects with SQL Server 2005 database.

- Contains a sql query producing a table and a stored procedure

Any guidance in this regard is highly appreciated.

Thank you.