473,549 Members | 2,615 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

sql 2005 connection issue

JD
Hello,

I am dealing with an issue, that although probably simple, is driving me
crazy. I am trying to connect to a SQL 2005 Express database through a web
service using the following code:

[WebMethod]
public XmlDocument GetAllAuthors()
{
XmlDocument doc = new XmlDocument();
DataSet prjDataSet = new DataSet("Projec tStatus");
using (SqlConnection conn = new
SqlConnection(" server=UA13098; uid=user;pwd=pa ss;database=for ms;"))
{
SqlDataAdapter adapter = new SqlDataAdapter( "Select
id,name,text, from prjstatus ", conn);
adapter.Fill(pr jDataSet, "ProjectStatus" );
}
doc.LoadXml(prj DataSet.GetXml( ));
return doc;
}

The problem is that I keep receiving an error that states: Login for 'user'
failed.....and it contains no further information. I can log into the SQL
console with the account just fine, and access the forms database. The
problem is only occurring when I try to access the database from the web
service.

Any suggestions are mosted appreciated.

Thanks
Oct 18 '06 #1
3 1335
Not sure if this is your problem but... With my set-up I can only have one
connection at a time. I find that if I leave VS server browser connected I
get the same message when trying to run the application in the dev
environment. To get around this I just make sure that I disconnect the
connection in the server view prior to running the app and this seems to
work fine.

--
RobP
'There are only 10 types of people in this world - Those that understand
binary and those that don't'

"JD" <je**@jditty.ne twrote in message
news:W9******** *************** *******@wideope nwest.com...
Hello,

I am dealing with an issue, that although probably simple, is driving me
crazy. I am trying to connect to a SQL 2005 Express database through a
web service using the following code:

[WebMethod]
public XmlDocument GetAllAuthors()
{
XmlDocument doc = new XmlDocument();
DataSet prjDataSet = new DataSet("Projec tStatus");
using (SqlConnection conn = new

SqlConnection(" server=UA13098; uid=user;pwd=pa ss;database=for ms;"))
{
SqlDataAdapter adapter = new SqlDataAdapter( "Select
id,name,text, from prjstatus ", conn);
adapter.Fill(pr jDataSet, "ProjectStatus" );
}
doc.LoadXml(prj DataSet.GetXml( ));
return doc;
}

The problem is that I keep receiving an error that states: Login for
'user' failed.....and it contains no further information. I can log into
the SQL console with the account just fine, and access the forms database.
The problem is only occurring when I try to access the database from the
web service.

Any suggestions are mosted appreciated.

Thanks

Oct 18 '06 #2
JD
Rob,

Thanks for the reply....this is not my issue. When I receive the error, I
do not have any other connections present.

I assume that my error is at the database, and not the code...not sure
though.

JD

"Rob Pollard" <ro************ @hotmail.comwro te in message
news:_q******** ***********@fe2 .news.blueyonde r.co.uk...
Not sure if this is your problem but... With my set-up I can only have one
connection at a time. I find that if I leave VS server browser connected I
get the same message when trying to run the application in the dev
environment. To get around this I just make sure that I disconnect the
connection in the server view prior to running the app and this seems to
work fine.

--
RobP
'There are only 10 types of people in this world - Those that understand
binary and those that don't'

"JD" <je**@jditty.ne twrote in message
news:W9******** *************** *******@wideope nwest.com...
>Hello,

I am dealing with an issue, that although probably simple, is driving me
crazy. I am trying to connect to a SQL 2005 Express database through a
web service using the following code:

[WebMethod]
public XmlDocument GetAllAuthors()
{
XmlDocument doc = new XmlDocument();
DataSet prjDataSet = new DataSet("Projec tStatus");
using (SqlConnection conn = new

SqlConnection( "server=UA13098 ;uid=user;pwd=p ass;database=fo rms;"))
{
SqlDataAdapter adapter = new SqlDataAdapter( "Select
id,name,text , from prjstatus ", conn);
adapter.Fill(pr jDataSet, "ProjectStatus" );
}
doc.LoadXml(prj DataSet.GetXml( ));
return doc;
}

The problem is that I keep receiving an error that states: Login for
'user' failed.....and it contains no further information. I can log into
the SQL console with the account just fine, and access the forms
database. The problem is only occurring when I try to access the database
from the web service.

Any suggestions are mosted appreciated.

Thanks


Oct 18 '06 #3
You probably just need to enable it for remote connections. See here:

http://blogs.msdn.com/sqlexpress/arc...05/415084.aspx

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"JD" wrote:
Hello,

I am dealing with an issue, that although probably simple, is driving me
crazy. I am trying to connect to a SQL 2005 Express database through a web
service using the following code:

[WebMethod]
public XmlDocument GetAllAuthors()
{
XmlDocument doc = new XmlDocument();
DataSet prjDataSet = new DataSet("Projec tStatus");
using (SqlConnection conn = new
SqlConnection(" server=UA13098; uid=user;pwd=pa ss;database=for ms;"))
{
SqlDataAdapter adapter = new SqlDataAdapter( "Select
id,name,text, from prjstatus ", conn);
adapter.Fill(pr jDataSet, "ProjectStatus" );
}
doc.LoadXml(prj DataSet.GetXml( ));
return doc;
}

The problem is that I keep receiving an error that states: Login for 'user'
failed.....and it contains no further information. I can log into the SQL
console with the account just fine, and access the forms database. The
problem is only occurring when I try to access the database from the web
service.

Any suggestions are mosted appreciated.

Thanks
Oct 18 '06 #4

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

Similar topics

10
13675
by: MVChauhan | last post by:
Hi We are planning to move over to SQL Server 2005 in near future. At the moment Website is on a seperate server then the Database. OS for both the server is Window 2003 and currently our data is on SQL Server 2000(on which everything works fine). Part of the testing process we tried to connect our website on SQL 2005 and it does not...
3
3152
by: Arpan | last post by:
I recently installed SQL Server 2005 (Management Studio Express) along with SQL Server 2005 Express (Configuration Manager) in my Win2K Pro m/c & use IIS 5.0 to run ASPX projects. I could add my database, named "MyDB", successfully. I am using the Windows Authentication mode to login to SQL Server. My server name is "AD\SQLEXPRESS" where "AD"...
3
3142
by: tommcd24 | last post by:
I have an in-house VB.NET 2.0 application that uses Crystal Reports for ..NET 2005 - CR10?). A few users access the program via a Wyse dumb-terminal via Citrix. For some reason that I've not been able to trace, these users are not able to view any of the reports. The same is also true if I attempt to view the reports while running the program...
3
7213
by: Mark Delaney | last post by:
When using the MS SQL 2005 JDBC driver, I now need to have the DNS name resolution to the client correctly set up. If not I get the following error: SQLState: 08S01 SQLError: 0 Message: hostname : hostname Where "hostname" is the client host name. It doesn't seem to matter if I
7
1769
by: Miro | last post by:
I think i have found my problem following an example ive searched for on the net. I am using vb.net 2005 express. What I am looking for is a drag drop from the toolbar that is an OleDbConnectionOleDbConnection and a OleDbDataAdapter so I can drag and drop these on the from, and Connect them to an mdb file. What I think I have come to,...
0
1646
by: Silly Milly | last post by:
Calling ALL SSIS GURUS I am trying to import identical MDBs (Access Database) columns into SQL Server 2005 using foreach loop in SSIS. The data and file name of the MDBs are not the same; however the structure (column) is. I do need to capture part of the file name and insert it into the destination column (i.e. Year). I've used the foreach...
10
6072
by: =?Utf-8?B?UHVuaXQgS2F1cg==?= | last post by:
Hi, I am developing a windows application in VS.NET 2005. The application is database driven and I need to deploy it on a client's pc. How should I go about developing such an application. I remember I did something once long back .. like including .mdf files into my project in the solution explorer of VS 2005 and then used Click Once...
6
1621
by: greg.hart | last post by:
Hello all, Just wanted to get some clarification on something. I was setting out to create a login page for people to login and then be able to access certain aspects of the website. Instead of doing what I usually do which is store the username password in a db table then compare what the user enters from the text boxes to what's in the...
0
2019
by: desmondgreen | last post by:
We have a problem with transaction management/concurrency when using ADO to update a database on a SQL 2005 database. We have a test application, to isolate and demonstrate the problem, where a VB6 client application gets a recordset and performs a simple update within the scope of an ADO transaction. When running multiple instances of the test...
0
7521
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
7451
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...
0
7810
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...
0
6044
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
5369
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
3483
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1944
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1061
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
764
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.