Any help is appreciated.I am also receving this code error, from a .Net 2003/C# to Crystal Report XI.
I get: Failled to Connection: [Vendor Error 17].
Is there a security permission that has been overlooked?
Here is the code I use to access CR XI
ConnectionInfo connectionInfo = new ConnectionInfo();
TableLogOnInfo tableLogOnInfo;
Database DB;
'CrystalDecisions.CrystalReports.Engine.Table' table;
Tables tables;
//Log in
connectionInfo.ServerName = "ServerName";
connectionInfo.DatabaseName = "Database Namet";
connectionInfo.UserID = "userid";
connectionInfo.Password = "password";
//Get Table inf from report
DB = reportDocument..Database;
tables = DB.Tables;
//Looping through all the tables in CR and apply connection info
for(int i = 0; i < tables.Count; i++)
{
table = tables[ i ];
tableLogOnInfo = table.LogOnInfo;
tableLogOnInfo.ConnectionInfo = connectionInfo;
table.ApplyLogOnInfo(tableLogOnInfo);
}
CrystalReportViewer.ReportSource = ReportDocument.ReportSource;
CrystalReportViewer.visible = true;
Thank you|||
Cacu,
Looks like your problem is not specific to linked server. Can you use other tools such as osql to connect to your SS2005 directly?
Certain SKUs of SQL 2005 do not allow remote connection by default. You can use SS2005 surface configuration manager to enable remote connection. If the server is a named instance, you also need to add firewall exception for sqlbrowser udp port 1434.
|||Hi, cacu
I assume your server 2000 and 2005 are in different Box, say server 2000 is your client, and 2005 is your target server. So, first, try to find osql.exe on your client box, "c:\program files\microsoft sql server\80\tools\binn", osql.exe /S<servermachine> /E, or "osql.exe /S<servermachine>\<Instancename> /E"( the latter is for named instance). would you also get the same error? For remote connection specific you need following checklist:
A. Enable "File and printer sharing" in Firewall if your server is behind that.
B. Add program "sqlbrowser.exe" or udp port "1434" in your firewall exception list.
C. Add tcp port "1433" of default instance or <port number> of named instance in firewall, check you errorlog to figure out which port server is listening on. If you want your connection over TCP and make sure your server has TCP enabled.
D. Try ping your remote server machine, name and ipaddress.
E. Try to telnet <remoterservername> <portnumber>
F. Try to access a share of your remote server.
If above list all passed, you should be able to connect to linked server unless other problem exists, normally, you could see event log or server log to get clue.
Good Luck!
Ming.
No comments:
Post a Comment