cancel
Showing results for 
Search instead for 
Did you mean: 

failed to load database information

Former Member
0 Kudos

hi,

i am developing web base report portal in asp.net (vs2012). my back end database is oracle 64bit under linux. i have deployed web base application in windows 2008 r2 64bit server. in that server i have installed oracle 11g 32 bit client, installed crystal report 2008 and also installed crystal report viewer ver 13 32bits. when i am previewing report in crystal report 2008 with jdbc connection there is no error and preview the report. but when try to run the report through asp.net, i am getting error "failed to load database information". i have tried to resolve by changing different viewer version, but to fail. is there any error in code? code is written as follows

            if (Request.QueryString["cr"] != null)

            {

                reportPath = "c:\\rptreports\\" + Request.QueryString["cr"];

                CrystalReportViewer1.ReportSource = reportPath;

               

                ConnectionInfo crConnectionInfo = MyClass.ConInfo();

                TableLogOnInfos crtableLogoninfos = new TableLogOnInfos();

                crtableLogoninfos = CrystalReportViewer1.LogOnInfo;

                foreach (TableLogOnInfo crtableLogoninfo in crtableLogoninfos)

                {

                    crtableLogoninfo.ConnectionInfo = crConnectionInfo;

                }

               

            }

        public static ConnectionInfo ConInfo()

        {

            ConnectionInfo connInfo = new ConnectionInfo();

            connInfo.ServerName = "orcl";

            connInfo.DatabaseName = "ORCL";

            connInfo.UserID = "uml";

            connInfo.Password = "uml";

            return connInfo;

        }

can anybody help me to resolve error?

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Keep in mind is that the CR designer is 32 bit and thus will only use a 32 bit client / datasource.

The CRVS runtime can be compiled as 32 bit, 64 bit or "Any CPU".

Thus an app compiled as 32 bit will look for a 32 bit datasource.

A 64 bit app will look for 64 bit datasource.

So, if your app is compiled as 32 bit and your datasource is 64 bit (back end database is oracle 64bit), then the report engine will throw the error you are seeing. You then have two options:

1) Compile the app as 64 bit

2) Install 32 bit datasource

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

Former Member
0 Kudos

thank u for suggestion.  application has been compiled and setup as 32bit app in iis and work fine with oracle connection used in rpt file. But if i use jdbc connection it gives error. if open rpt and preview in crystal report 2008 using jdbc connection. it works fine. that means there is no compatibility issue with oracle back end database.  i feel i am missing some setup in deployment part or in coding.

Former Member
0 Kudos

i have also tried with changing coding as follows, but raise same error, i am attaching snap shot report generated from CR 2008. it work fine and generate report.

               reportPath = "c:\\rptreports\\" + Request.QueryString["cr"];

                ReportDocument reportDocument = new ReportDocument();

                reportDocument.Load(reportPath);

                Tables CrTables = reportDocument.Database.Tables;

                TableLogOnInfos crtableLogoninfos = new TableLogOnInfos();

                TableLogOnInfo crtableLogoninfo = new TableLogOnInfo();

                ConnectionInfo crConnectionInfo = new ConnectionInfo();

                DbConnectionAttributes dbconn = new DbConnectionAttributes();

                NameValuePairs2 pbag = new NameValuePairs2();

                pbag.Set("Connection URL", "jdbc:oracle:thin:@192.168.2.2:1521:orcl");

                pbag.Set("Database Class Name", "oracle.jdbc.driver.OracleDriver");

                pbag.Set("Database DLL", "crdb_jdbc.dll");

                pbag.Set("Server", "192.168.2.2");

                pbag.Set("Trusted Connection", "false");

                pbag.Set("Use JDBC", "true");

                dbconn.Collection = pbag;

                crConnectionInfo.ServerName = "192.168.2.2";

                crConnectionInfo.DatabaseName = "ORCL";

                crConnectionInfo.UserID = "uml";

                crConnectionInfo.Password = "uml";

                crConnectionInfo.Attributes = dbconn;

                foreach (CrystalDecisions.CrystalReports.Engine.Table CrTable in CrTables)

                {

                    crtableLogoninfo = CrTable.LogOnInfo;

                    crtableLogoninfo.ConnectionInfo = crConnectionInfo;

                    CrTable.ApplyLogOnInfo(crtableLogoninfo);

                }

                CrystalReportViewer1.ReportSource = reportDocument;

Former Member
0 Kudos

i have observed that in C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86 i do not find crdb_jdbc.dll file. is error due to dll file missing?

former_member183750
Active Contributor
0 Kudos

Well, yes, the file is not there as "SAP Crystal Reports, Developer Version for Visual Studio .NET" does not support jdbc connecion. See the for more details.

- Ludek

Answers (1)

Answers (1)

Former Member
0 Kudos

it is working fine if i use oracle connection