Click here to Skip to main content
15,909,953 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Try Catch Not working porperly... Pin
Abhijit Jana16-Apr-09 23:45
professionalAbhijit Jana16-Apr-09 23:45 
GeneralRe: Try Catch Not working porperly... Pin
Dev S16-Apr-09 23:52
Dev S16-Apr-09 23:52 
GeneralRe: Try Catch Not working porperly... Pin
Abhijit Jana17-Apr-09 0:14
professionalAbhijit Jana17-Apr-09 0:14 
GeneralRe: Try Catch Not working porperly... Pin
Christian Graus17-Apr-09 12:54
protectorChristian Graus17-Apr-09 12:54 
AnswerRe: Try Catch Not working porperly... Pin
Arindam Tewary17-Apr-09 2:12
professionalArindam Tewary17-Apr-09 2:12 
GeneralRe: Try Catch Not working porperly... Pin
Dev S17-Apr-09 3:32
Dev S17-Apr-09 3:32 
AnswerRe: Try Catch Not working porperly... Pin
Yusuf17-Apr-09 6:06
Yusuf17-Apr-09 6:06 
QuestionProblems with Web Service Pin
Raymundo Valdez16-Apr-09 20:26
Raymundo Valdez16-Apr-09 20:26 
Hiya everybody! I need some help trying to find out why is my WS not working as I want it to. I'm newbie when it comes to WebServices.

I got one that helps me get a DataSet so I can work with disconnected data.

public DataSet WSfnGetInfo(string strQuery, string strName, string strClientUser, string strClientPassword)
{
strUser = strClientUser;
strPassword = strClientPassword;

fnCreateCS(); //Create the connection String

SqlDataAdapter dAdapter = new SqlDataAdapter(strQuery, connString );
// DA to fill the Dataset

DataSet dsInfo = new DataSet();
//Dataset

dAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey;

try
{
dAdapter.Fill(dsInfo, strName);
//fill the data set
}
catch(SqlException ex)
{
//to return an error
System.Web.HttpContext.Current.Response.Write(ex.Message);
return null;
}

return dsInfo;
//Sending the dataset to the client
}


Then I got my client WinApp in which I use this code to show the dataset on datagridview.

myServ.Service myService = new myServ.Service();

try
{
dsMeals = myService.WSfnGetInfo("SELECT * FROM dbo.MEALS", "MEALS", f1ref.user, f1ref.password);

dataGridView1.DataSource = dsMeals;
dataGridView1.DataMember = "MEALS";

}
catch (Exception ex)
{
MessageBox.Show(ex.Message + " " + ex.HelpLink + " " + ex.Data);
}


I can't get to show the data in datset in gridview. I get an error that the "Respons/Answer is not correct XML code". I'm stuck there.

From what I've read, returning DataSet from a WS ain't the best practice due nature of XML WSs and that it is too much text.

Any help is appreciated. Cry | :((

I'm using this as a reference http://msdn.microsoft.com/en-us/library/s5xy331f(VS.80).aspx[^]
Questionsql server connection using ADO.net Pin
cemalakshmi16-Apr-09 19:54
cemalakshmi16-Apr-09 19:54 
AnswerRe: sql server connection using ADO.net Pin
Abhijit Jana16-Apr-09 20:08
professionalAbhijit Jana16-Apr-09 20:08 
QuestionList of countries in Asp.Net 3.5 Pin
Maxy5516-Apr-09 19:48
Maxy5516-Apr-09 19:48 
AnswerRe: List of countries in Asp.Net 3.5 Pin
Christian Graus16-Apr-09 19:52
protectorChristian Graus16-Apr-09 19:52 
AnswerRe: List of countries in Asp.Net 3.5 Pin
shashank70116-Apr-09 22:15
shashank70116-Apr-09 22:15 
AnswerRe: List of countries in Asp.Net 3.5 Pin
Yusuf17-Apr-09 3:34
Yusuf17-Apr-09 3:34 
Questiondownload visual studio 2005 Pin
bhavna432116-Apr-09 19:30
bhavna432116-Apr-09 19:30 
AnswerRe: download visual studio 2005 Pin
Abhijit Jana16-Apr-09 19:33
professionalAbhijit Jana16-Apr-09 19:33 
AnswerRe: download visual studio 2005 Pin
Christian Graus16-Apr-09 19:45
protectorChristian Graus16-Apr-09 19:45 
AnswerRe: download visual studio 2005 Pin
shashank70116-Apr-09 22:18
shashank70116-Apr-09 22:18 
QuestionVisual Foxpro Database/Table in ASP.NET Pin
Girish48116-Apr-09 17:09
Girish48116-Apr-09 17:09 
AnswerRe: Visual Foxpro Database/Table in ASP.NET Pin
Christian Graus16-Apr-09 17:17
protectorChristian Graus16-Apr-09 17:17 
GeneralRe: Visual Foxpro Database/Table in ASP.NET Pin
Girish48116-Apr-09 17:27
Girish48116-Apr-09 17:27 
QuestionAJAX Update Panel... Pin
Illegal Operation16-Apr-09 15:58
Illegal Operation16-Apr-09 15:58 
AnswerRe: AJAX Update Panel... Pin
mr_muskurahat16-Apr-09 21:50
mr_muskurahat16-Apr-09 21:50 
QuestionSys.WebForms.PageRequestManager.getInstance().add_endRequest not working Pin
goodideadave16-Apr-09 13:29
goodideadave16-Apr-09 13:29 
Questionfor project titles Pin
vvikram16-Apr-09 11:58
vvikram16-Apr-09 11:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.