473,547 Members | 2,638 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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?

Thanks,

Jerry
Nov 18 '05 #1
6 2425
the servers can't communicate. firewall perhaps?

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Jerry Higgins" <je************ *@yahoo.com> wrote in message
news:1c******** *************** *****@phx.gbl.. .
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?

Thanks,

Jerry

Nov 18 '05 #2
I can connect fine through SQL Enterprise manager. Also,
as I mentioned in the post, I can right click on the
SqlDataAdapter and read the data fine.

-----Original Message-----
the servers can't communicate. firewall perhaps?

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Jerry Higgins" <je************ *@yahoo.com> wrote in messagenews:1c******* *************** ******@phx.gbl. ..
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?

Thanks,

Jerry

.

Nov 18 '05 #3
is this where the server that you are publishing to? or do you mean locally
even?
Try IP instead of NAME for server also

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
<je************ *@yahoo.com> wrote in message
news:1e******** *************** *****@phx.gbl.. .
I can connect fine through SQL Enterprise manager. Also,
as I mentioned in the post, I can right click on the
SqlDataAdapter and read the data fine.

-----Original Message-----
the servers can't communicate. firewall perhaps?

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Jerry Higgins" <je************ *@yahoo.com> wrote in

message
news:1c******* *************** ******@phx.gbl. ..
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?

Thanks,

Jerry

.

Nov 18 '05 #4
Jerry, when using Enterprise Manager or right clicking on the
SqlDataAdapter, you are logged in as yourself, through the Web form, you
connect as the ASP.NET user. I would examine the "Login failed for user sa"
a bit closer, sounds like it can be true.

<je************ *@yahoo.com> wrote in message
news:1e******** *************** *****@phx.gbl.. .
I can connect fine through SQL Enterprise manager. Also,
as I mentioned in the post, I can right click on the
SqlDataAdapter and read the data fine.

-----Original Message-----
the servers can't communicate. firewall perhaps?

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Jerry Higgins" <je************ *@yahoo.com> wrote in

message
news:1c******* *************** ******@phx.gbl. ..
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?

Thanks,

Jerry

.

Nov 18 '05 #5
I see what you are saying but not sure how to resolve
it. In order to get this to work on my machine I had to
add ASPNET as a user in the SQL Server database on my
machine. When I try to add ASPNET as a user in SqlServer
on the other machine I get the error

"Error 15401: Windows NT user or
group '<machinename>\ ASPNET' not found. Check the name
again."

Thanks,

Jerry
-----Original Message-----
Jerry, when using Enterprise Manager or right clicking on theSqlDataAdapter , you are logged in as yourself, through the Web form, youconnect as the ASP.NET user. I would examine the "Login failed for user sa"a bit closer, sounds like it can be true.

<je*********** **@yahoo.com> wrote in message
news:1e******* *************** ******@phx.gbl. ..
I can connect fine through SQL Enterprise manager. Also, as I mentioned in the post, I can right click on the
SqlDataAdapter and read the data fine.

>-----Original Message-----
>the servers can't communicate. firewall perhaps?
>
>--
>Curt Christianson
>Owner/Lead Developer, DF-Software
>www.Darkfalz.com
>
>
>"Jerry Higgins" <je************ *@yahoo.com> wrote in

message
>news:1c******* *************** ******@phx.gbl. ..
>> 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?
>>
>> Thanks,
>>
>> Jerry
>
>
>.
>

.

Nov 18 '05 #6
I'm not sure I understand. I don't think I'm publishing
to a server. I am simply trying to read the data out of
a database on another machine and display it in the
grid. When I get the data from my machine
(locally) everything is fine. Do you mean change the
name of the server in the connection string to and IP
address? I can try that. I'm still wondering why I can
get the data from the SqlDataAdapter but not the grid.

-----Original Message-----
is this where the server that you are publishing to? or do you mean locallyeven?
Try IP instead of NAME for server also

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
<je*********** **@yahoo.com> wrote in message
news:1e******* *************** ******@phx.gbl. ..
I can connect fine through SQL Enterprise manager. Also, as I mentioned in the post, I can right click on the
SqlDataAdapter and read the data fine.

>-----Original Message-----
>the servers can't communicate. firewall perhaps?
>
>--
>Curt Christianson
>Owner/Lead Developer, DF-Software
>www.Darkfalz.com
>
>
>"Jerry Higgins" <je************ *@yahoo.com> wrote in

message
>news:1c******* *************** ******@phx.gbl. ..
>> 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?
>>
>> Thanks,
>>
>> Jerry
>
>
>.
>

.

Nov 18 '05 #7

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

Similar topics

1
320
by: Seth Guard | last post by:
(Sorry for the cross-post, but no one responded to my other thread.) When developing a web page in VS.Net, I see everything in WYSIWYG format. And when I am creating a User Control, I see that drawn the same way. However, when I drag the User Control onto my main page, I see a gray box where the User Control should be. (I was expecting...
4
396
by: Jerry Higgins | last post by:
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...
0
4030
by: Dave | last post by:
Can I create a user control so that when I drop it on the web form I can put text between the start and end tags as listed <uc1:KeyFeatures id="KeyFeatures1" runat="server" >test..</uc1:KeyFeatures Each one will have some lengthy text with bulleted lists, etc and I wanted this for readability. Can I set a property to accept this "innerText"...
4
2739
by: Guadala Harry | last post by:
Is there any way for one Session to remove and update objects in another Session? I seriously doubt it, but thought I'd ask. Here's why: I have some data that is unique per user (or per session - similar to "welcome back, Jim" after Jim logs in) and consumed across multiple pages. This "per user" data lives in a database, so toward improving...
2
1184
by: Shane | last post by:
I'm creating a user control that has a textbox along with a couple of other controls in it. I'm mapping most of the textbox methods and properties to my control using the textbox names. I'm having a problem with the "Select" method. "Select" is a Visual Basic keyword, so the IDE will not let me create that method. I'm currently using...
2
2079
by: Robert Zahm | last post by:
I have created a C# user control which display certain filesystem information, and allows the user to drag an drop files into and out of the control. I then placed this user form in IE using an <object> tag. Doing this has broken the drag and drop functionality from Windows Explorer into IE (it still works fine going from IE to Windows...
0
1307
by: obs | last post by:
Hi all. I have a page with a login control. I was wondering what's the way to use the remember me login control. I know it has something to do with cookies, but since I am a total noobie, I don't know how to do it. Please help, thanks in advance.
4
2287
by: Scott McNair | last post by:
Hi, I'm creating a user control that has absolutely no visual pieces to it... it's essentially a piece that sniffs a serial port awaiting incoming data. I know that there are several controls that come natively with .NET that don't actually reside on the form, but go to the bottom area, such as for example database-related controls. How...
1
1534
by: Fresno Bob | last post by:
I am using the ajax modal popup. The panel I am popping up has a lot css formatting to give it things like drop shadows rounded edges. This formatting will be used on all the popups. Is there any way I can "template" my panel or user control in a similar way to a master page to save having to add all that markup. Some kind of header/footer...
0
7510
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7703
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7463
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6032
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5362
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5081
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3493
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1050
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
748
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.