473,320 Members | 1,940 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Login failed for user 'sa'" datagrid control - SqlDataAdapter

Curt and Chris,

Original post - April 20.

I added a SqlDataAdapter to a web form, created a data
connection, and generated a dataset. I then connected it
to a DataGrid control. When I do this using the
SqlServer database on my machine everything works fine.
When I do it using a SqlServer database on another
machine I get the "Login failed for user sa" error.
However, when I right click on the SqlDataAdapter and
click "Preview Data" it brings back the data OK. Why
would it bring back the data on this but not work in the
DataGrid control?

The problem was this. When you configure the data
adapter and it enters the connect string into the
SqlConnection tool it doesn't add the password even
though the configuration wizard asks you for it.

Nov 18 '05 #1
1 1366
manually create your connection string and populate it that way.
I never use the wizards for any of that

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Jerry Higgins" <je*************@yahoo.com> wrote in message
news:25****************************@phx.gbl...
Curt and Chris,

Original post - April 20.

I added a SqlDataAdapter to a web form, created a data
connection, and generated a dataset. I then connected it
to a DataGrid control. When I do this using the
SqlServer database on my machine everything works fine.
When I do it using a SqlServer database on another
machine I get the "Login failed for user sa" error.
However, when I right click on the SqlDataAdapter and
click "Preview Data" it brings back the data OK. Why
would it bring back the data on this but not work in the
DataGrid control?

The problem was this. When you configure the data
adapter and it enters the connect string into the
SqlConnection tool it doesn't add the password even
though the configuration wizard asks you for it.

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Tim T | last post by:
Hi, I have a web application that has a number of users who administer their own data... i have several pages that check to see if a valid userID session exists, and if not, send them to a...
1
by: John | last post by:
Hi I have placed a login control on a web form. When I run the webform and click on the login button with dummy username & password, I get the following error; Exception Details:...
5
by: Glen | last post by:
Does anybody know a way to make the button on the Login control be the default button on the page? I have a master page with an ImageButton and a content page with a Login control. When I enter...
1
by: EricRybarczyk | last post by:
I am starting a rewrite of an existing Classic ASP web site in ASP.NET 2.0. The existing ASP application has several types of users, each with a separate login process (separate login page,...
1
by: soumya | last post by:
Hello all, I have a problem with displaying the "CreateUserUrl" property of the Login control on a Content Panel. I do not know what the reason is except for that particular property, everything...
3
by: Bruce | last post by:
I just started the design of an ASP.NET application which accesses one of our custom web services to provide user authentication, among other purposes. I created a log-in page (code below),...
3
by: WebBuilder451 | last post by:
i created a basic login control and changed it to a template. Then i droped a label on to it. in code behind it can not be found? I tried me.logincortrol.whatever but it can't be found. Ok this is...
5
by: Afshar | last post by:
Hi everybody there, I have a special Login page that wants users to enter 3 passwords rather than a single password. But can't do it with Login control. I tried following scenarios: 1. Put an...
3
by: Max2006 | last post by:
Hi, I am using ASP.NET 2.0 Membership and I need to authenticate a user without using login control. Is there any sample code that shows me how to do that? Thank you, Max
3
by: =?Utf-8?B?RHVrZSAoQU4yNDcp?= | last post by:
The majority of pages on our site need authentication (forms auth against the aspnetdb database). I created an '~/auth' folder with its own config file forcing authentication for any pages in the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.