0
votes

I am Using SQL Server Management 2012. And connected to my online database which is on Godaddy's server. I Create an windows application in c# and using visual studio 2012. Used string constring = "Data Source=184.168.47.21;Initial Catalog=ROT;User Id=myusername;Password=mypassword;"; It works fine. Insert,update,delete all works fine. But now i am creating report. For that i used Report Wizard -> New database ->new dataset -> New Connection -> Servername=184.168.47.21 , clicked on Use SQL server authentication , write Username, password, write or select database name = ROT , clicked on test connection and got message Test connection Succeeded. In Short I create two files Named "Report1.rdlc" and "ROTDataSet.xsd". I designed report completely and take a reportViewer1 for displaying Report1.rdlc.

** this.tbl_BookingTableAdapter.Fill(this.ROTDataSet.tbl_Booking,i); this.reportViewer1.RefreshReport();** above code is of button1_click event.And "i" is a integer parameter i am passing to it.

but when i click on this button it gives an error in file named "ROTDataSet.Designer.cs" on line "this.Adapter.Fill(dataTable);" Error says "SqlException was unhandled. Login failed for user 'myusername'."

Now Please tell me what i am doing wrong? SqlConnection conn is working perfectly in application for select and insert query but it gives error in creating report. Even i can see my Table,Table adapter in .Xsd file.

1

1 Answers