473,395 Members | 1,891 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,395 software developers and data experts.

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("ProjectStatus");
using (SqlConnection conn = new
SqlConnection("server=UA13098;uid=user;pwd=pass;da tabase=forms;"))
{
SqlDataAdapter adapter = new SqlDataAdapter("Select
id,name,text, from prjstatus ", conn);
adapter.Fill(prjDataSet, "ProjectStatus");
}
doc.LoadXml(prjDataSet.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 1320
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.netwrote in message
news:W9******************************@wideopenwest .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("ProjectStatus");
using (SqlConnection conn = new

SqlConnection("server=UA13098;uid=user;pwd=pass;da tabase=forms;"))
{
SqlDataAdapter adapter = new SqlDataAdapter("Select
id,name,text, from prjstatus ", conn);
adapter.Fill(prjDataSet, "ProjectStatus");
}
doc.LoadXml(prjDataSet.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.comwrote in message
news:_q*******************@fe2.news.blueyonder.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.netwrote in message
news:W9******************************@wideopenwest .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("ProjectStatus");
using (SqlConnection conn = new

SqlConnection("server=UA13098;uid=user;pwd=pass;d atabase=forms;"))
{
SqlDataAdapter adapter = new SqlDataAdapter("Select
id,name,text, from prjstatus ", conn);
adapter.Fill(prjDataSet, "ProjectStatus");
}
doc.LoadXml(prjDataSet.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("ProjectStatus");
using (SqlConnection conn = new
SqlConnection("server=UA13098;uid=user;pwd=pass;da tabase=forms;"))
{
SqlDataAdapter adapter = new SqlDataAdapter("Select
id,name,text, from prjstatus ", conn);
adapter.Fill(prjDataSet, "ProjectStatus");
}
doc.LoadXml(prjDataSet.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
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...
3
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...
3
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...
3
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:...
7
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...
0
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...
10
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...
6
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...
0
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...
0
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,...

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.