J
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;database=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
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;database=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