This is a migrated thread and some comments may be shown as answers.

Login Failed Message

8 Answers 459 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Susan
Top achievements
Rank 1
Susan asked on 26 Jun 2008, 01:54 AM
i have created my class library and got my first report to work. i am using a sqldataadapter and parameters with a stored procedure. when i go to create a second report, i drag the sqladapter onto the report and use the connection that already existed for the first report. i have tried this numerous times, and every time i go to preview the report i get: login failed for user xxxxxx.

i believe i have done everything the exact same way. once i create and configure the dataadapter, i set the datasource. i can see my fields in the data explorer. the only difference i see is that in the first report, there is a sqlselectcommand1 at the bottom with the dataadapter and the connection objects on the reports that work but on the one that does not, that sqlselectcommand object is not present. i don't know if this is the problem, but i cannot get that object on the report.

thanks and let me know if you need any more information.

thanks,
susan

8 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 26 Jun 2008, 02:22 PM
Hi Susan,

There are a few things that are unclear:
  • the connection that already exists is simply a "pointer" to the database. It does not relate to the previous dataadapter.
  • the dataadapter is not related to the report. It is simply a mean to connect the report to a datasource.
  • the sqlselectcommand does not have to be in the field where the dataadapter and sqlconnection are placed. You can find the select statement in its commandText property in your dataadapter or in the stored procedure depending on the case.
  • you have not specified what exactly is not working. You state that you can see the fields, so what is the trouble?
Elaborating on your question/problem would be highly appreciated in order to help you.
Kind regards,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Susan
Top achievements
Rank 1
answered on 26 Jun 2008, 08:58 PM
i understand the connection is a pointer to the database and that this 'connection' object can be used with all your reports. the dataadapter used to connect the report to the datasource must exist for each reports, as i am using a stored procedure that is different for each report. so when i drag the dataadapter object onto my second report and configure it (just like i did for my first report), when i try and preview the report i get the error:

login failed for user xxxxxx

i know the login information is correct as it works for the first report AND i am using the same connection object.

thanks for your help.
susan
0
Steve
Telerik team
answered on 27 Jun 2008, 03:38 PM
Hi Susan,

That is very strange but seems like a problem with the connection to the sql server rather than problem caused by the reporting product. Can you try using the same connection and stored procedure to bind a standard .NET2.0 GridView control and verify that the login credentials work?
You can also try using Windows Authentication by setting Trusted Connection = TRUE or Integrated Security = SSPI in the connection string and see if it works that way.

All the best,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Susan
Top achievements
Rank 1
answered on 27 Jun 2008, 07:08 PM
thanks for your response. i know the login credentials work as they work for the other report that is in my class library. i have 1 report in there that is working fine, but when i create a second report, use the same connection object and define a new dataadapter, i get the login failed error.

thanks,
susan
0
Steve
Telerik team
answered on 01 Jul 2008, 08:29 AM
Hi Susan,

Although this does not seem like reporting problem, we would not be able to help further until you provide us with more specific information and sample report + database backup, which we can use to run locally and investigate what is going on. Still we believe that testing this connection string in a normal .NET2.0 website with GridView would be the best way to go and figure out where the problem lies in. Open your SQL management studio and check the permissions for that user, create a new one and test with it if necessary.

Greetings,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Susan
Top achievements
Rank 1
answered on 01 Jul 2008, 01:08 PM
i believe i got it. when i created report #1 and created the connect string, all was well. when i went to use this same connection string for report #2 i received the 'login failed for user xxxxx'. i finally noticed that the password got dropped from the connection string (i did indicate to put it in the string in plain text). when i manually typed the password back into the connection string, all appears to be working.

thanks for helping out and keeping me focused on the connection string itself.

susan
0
Xorcist
Top achievements
Rank 1
answered on 03 Feb 2010, 02:17 PM
I've run into the same exact issue with the same exact setup (using VS2008), however the password get's dropped off the connection string randomly. I'll be working on the report fine for a half hour and WHAM, data explorer empties out, can't preview the report (same error message as above), and I have to manually re-enter the password onto the connection string to get it all working again. It's a major pain in the butt, and I can't figure out what the cause is. I know the soution, and am dealing with it, but does anyone know WHY this is happening?
0
luisv21
Top achievements
Rank 1
answered on 15 May 2015, 08:09 PM

Susan you're right, I had the same problem. I had lost my password in the connection string

Thanks.

Tags
General Discussions
Asked by
Susan
Top achievements
Rank 1
Answers by
Steve
Telerik team
Susan
Top achievements
Rank 1
Xorcist
Top achievements
Rank 1
luisv21
Top achievements
Rank 1
Share this question
or