473,804 Members | 2,246 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 2450
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 to see my User Control actually *rendered* on the Design screen, similar to how FrontPage renders...
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 click on the SqlDataAdapter and click "Preview Data" it brings back the data OK. Why would it...
0
4041
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" as a value When I do this I get Literal content ('test..') is not allowed within a...
4
2758
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 runtime performance I want to cache data supporting this and similar per user features. Because the...
2
1192
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 "Selects" instead, but I like consistancy. Anybody know a work around?
2
2096
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 Explorer). The problem is that whenever I drag a file over IE, IE wants to implement the drop...
0
1318
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
2300
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 would I go about setting my own control to do just that? Otherwise I'm left with the quandary of...
1
1546
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 template might work. Can anyone point me in the right direction? Regards, Chris.
0
9714
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9594
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10096
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9174
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7638
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6866
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5534
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3834
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3002
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.