Click here to Skip to main content

Arek Suroboyo - Professional Profile

765
Author
6
Debator
10
Organiser
314
Participant
0
Authority
0
Editor
0
Enquirer
No Biography provided
Member since Wednesday, January 3, 2007 (5 years, 4 months)

For more information on Reputation please see the FAQ.
 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
  Refresh
GeneralCould not establish connection to network Pin
Wednesday, January 31, 2007 10:17 PM
Hi all..
 
I am a new guy who try to develop Mobile application using C#.NET and Pocket PC Emulator.
I had developed and tested a Web Service. and it work succesfully!! Here is the code :
 
[WebMethod(Description = "Shows all Sales Data")]
public DataSet ReturnData()
{
String ConnectionString = "server=(local);Integrated Security=SSPI;Persist Security Info=False;uid=ekoyw;pwd=;database=Latihan";
SqlConnection SqlCon = new SqlConnection(ConnectionString);
SqlCon.Open();
SqlDataAdapter SqlDa = new SqlDataAdapter("Select * from Sales", SqlCon);
DataSet Ds = new DataSet();
SqlDa.Fill(Ds);
return Ds;
}
 
Then, I added this web service as Web reference on my mobile application. here is the code :
 
private void btnGetSales_Click(object sender, EventArgs e)
{
Cursor.Current = Cursors.WaitCursor;
CustomerSalesWebService.CustomerSalesWebService_CSharp wsCustSales =
new CustomerSalesWebService.CustomerSalesWebService_CSharp();
DataSet dsSales = new DataSet("sales");
DataTable dtSales = new DataTable("Sales");
dsSales = wsCustSales.ReturnData();
this.grdSales.DataSource = dsSales.Tables[0];
Cursor.Current = Cursors.Default;
 
}
 
and tested on Pocket PC. but "Could not establish connection to network" appeared. I have followed the instruction to update my ActiveSync. Also tested my Web Service on Pocket PC and everything was fine!!
 
but the error message still appeared on
///
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://servername//xmlwebservices/ReturnData", RequestNamespace="http://servername//xmlwebservices/", ResponseNamespace="http://servername//xmlwebservices/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public System.Data.DataSet ReturnData() {
object[] results = this.Invoke("ReturnData", new object[0]);
return ((System.Data.DataSet)(results[0]));
}
 
that's all guys...
help me please !!!!

GeneralRe: Could not establish connection to network PinmemberArek Suroboyo17:23 1 Feb '07  

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


Advertise | Privacy | Mobile
Web02 | 2.5.120528.1 | Last Updated 28 May 2012
Copyright © CodeProject, 1999-2012
All Rights Reserved. Terms of Use
Layout: fixed | fluid