Skip to Content
0
Former Member
Jun 15, 2009 at 06:55 AM

ApplyLogOnInfo method returns error while connecting to named instance

8 Views

I am using C# and report was designed in CR XI.

ApplyLogOnInfo method returns error while trying to connect the named instance of SQL Server 2005.

TableLogOnInfo tableLogonInfo = table.LogOnInfo; 
tableLogonInfo.ConnectionInfo.ServerName = @"TestServer\Instance1"; //Connnecting to Named instance of SQL Server 2005
tableLogonInfo.ConnectionInfo.UserID = "sa";
tableLogonInfo.ConnectionInfo.Password = "password";
tableLogonInfo.ConnectionInfo.DatabaseName = "TEST_DB";
table.ApplyLogOnInfo(tableLogonInfo); 

Thanks in advance