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.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" <jerryhiggins_us@.yahoo.com> wrote in message
news:256001c427d8$82d2d190$a401280a@.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.
>
>
0 comments:
Post a Comment