Print Page | Close Window

table connectivity does not work

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Data Connectivity
Forum Discription: How to connect to data sources and export reports
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=640
Printed Date: 19 May 2024 at 1:38pm


Topic: table connectivity does not work
Posted By: malkie
Subject: table connectivity does not work
Date Posted: 09 May 2007 at 2:31pm

I am applying the logon information to the report in my application.  ON my development machine the information displays fine.  On the production machine the Table.TestConnectivity Method always fails.  Then the logon screen is displayed with the database, username, and password filled in - but the server is empty and read only.  After this the logon always fails.  Why would the server be blank?  and what could be different on the production machine?

I know that the connection works from the production machine because I am using it for other things in the application also.
 
 

ConnectionInfo ci = new ConnectionInfo();

ci.ServerName = server;

ci.DatabaseName = db;

ci.UserID = id;

ci.Password = pass;

 

....

 

TableLogOnInfo li;

// for each table apply connection info

foreach (Table tbl in cr.Database.Tables)

{

li = tbl.LogOnInfo;

li.ConnectionInfo = ci;

tbl.ApplyLogOnInfo(li);

// check if logon was successful

if (tbl.TestConnectivity())  --THIS FAILS

{

// drop fully qualified table location

if (tbl.Location.IndexOf(".") > 0)

{

tbl.Location =

tbl.Location.Substring(tbl.Location.LastIndexOf(".")

+ 1);

}

else tbl.Location = tbl.Location;

}




Replies:
Posted By: malkie
Date Posted: 11 May 2007 at 11:10am
In case this helps anybody else out.
 
You need to install SQL Native Client on the machine if it is not already installed. Clap


Posted By: BrianBischof
Date Posted: 11 May 2007 at 11:28am
Thanks for the update. I need to do more research on the SQL Native Client to see how it effects Crystal Reports.

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>



Print Page | Close Window