Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
biim
Starting Member
8 Posts |
Posted - 2008-10-07 : 15:04:38
|
I have a procedure using the custom Code in SSRS 2005. This function calls a SQL stored procedure to insert records to a SQL Server 2005. Here is my connection stringoConn.ConnectionString = "Data Source=DevServer;Initial Catalog=DBName;Integrated Security=SSPI"When I run the SSRS report in Visual Studio 2005, the report runs ok and it calls the stored procedure to insert the records. It works all the time in my Visual Studio. However, when I publish the report in our development and production SSRS sites, it does not call the stored procedure and fails to insert the records. I hope someone can help me. |
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2008-10-07 : 15:22:25
|
Is the server in your production environment called DevServer as it is in VS ?And also is it a trusted connection ? |
|
|
biim
Starting Member
8 Posts |
Posted - 2008-10-07 : 15:32:56
|
Response to afrika:Yes, server name is the same. I think it is a trusted connection. The other issue is even if I use a SQL server userid to connect and insert the records, it is still not working when run from the SSRS site. But it works when it is in Visual Studio 2005. I already tried to execute the stored procedure to insert records directly from the query analyzer. It worked too. Thank you. |
|
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2008-10-07 : 16:11:06
|
What error messages are you getting.Assuming your server is called DevServer and database called DBName and you are sure its a trusted connection.For connection strings see www.connectionstrings.com |
|
|
biim
Starting Member
8 Posts |
Posted - 2008-10-07 : 16:41:19
|
Response to afrika:Our network admin guy just told me that we are not in a trusted connection. The other connection string I tried to use in Visual Studio and worked, but failed in SSRS report server site: oConn.ConnectionString = "Data Source=DevServer;Initial Catalog=MyReportDB;User ID=ReadRpt;Password=mypass"I embedded this code as part of the custom code that calls the stored procedure to insert the records. The only shared data source linked to this report the XML data source that reads the SharePoint list data. That works ok too in our SSRS report site because I can read the data directly when linked to a report table.Thank you. |
|
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2008-10-07 : 17:25:20
|
Glad2help |
|
|
biim
Starting Member
8 Posts |
Posted - 2008-10-08 : 11:58:37
|
Response to afrika:Thank you for your tips. However, it is still failing to insert records when the stored procedure is called using the oConn.ConnectionString = "Data Source=DevServer;Initial Catalog=MyReportDB;User ID=ReadRpt;Password=mypass". There are no error messages either so my guess is that the SQL Server userid "ReadRpt" is not getting authenticated properly. I tried to create another SQL user id but it failed too.Any help will be very much appreciated.Thank you. |
|
|
|
|
|