Quantcast
Channel: SCN : Unanswered Discussions - SAP Crystal Reports, version for Visual Studio
Viewing all articles
Browse latest Browse all 2556

Cannot get table.TestConnectivity() to work with ASE database

$
0
0

I have a report that works fine in the designer (ver 14.1.1.1036) using a store procedure from a Sybase/SAP ASE database.

 

When I try to use it from a C# windows forms application TestConnectivity() always fails.

 

This fails:

 

Rpt = new ReportDocument();

Rpt.Load(report_file);

Rpt.SetDatabaseLogon("dbxx", "password", "LBCTEST", "test3" );

foreach(Table table in Rpt.Database.Tables)

{

  if(!table.TestConnectivity())

       throw new Exception("TestConnectivity() failed!");

}

 

 

And this fails:

 

Rpt = new ReportDocument();

Rpt.Load(report_file);

 

foreach(Table table in Rpt.Database.Tables)

{

     TableLogOnInfo tableLogOnInfo = table.LogOnInfo;

     ConnectionInfo connInfo = tableLogOnInfo.ConnectionInfo;

     connInfo.ServerName = "LBCTEST";

     connInfo.DatabaseName = "test3";

     connInfo.UserID = "dbxx";

     connInfo.Password = "password";

 

     tableLogOnInfo.ConnectionInfo = connInfo;

     table.ApplyLogOnInfo(tableLogOnInfo);

     if(!table.TestConnectivity())

          throw new Exception("TestConnectivity() failed!");

}

 

What am I doing wrong?  Where do I go from here?

 

Thanks,

John


Viewing all articles
Browse latest Browse all 2556

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>