WinCE and Pocket PC difference working with web-service

R

Roman Moiseenko

Hi!
I'm developing application for Symbol MK 2000 based on Windows CE.NET 4.1.
My app using web method returning DataSet. After I calling this web method
app throw PlatformNotSupportedException.
But exact application running on Symbol MC 50 (based on Windows Mobile 2003)
works fine. What difference?

[WebMethod]

public DataSet Select()

{

DataSet ds = new DataSet();

SqlConnection cn = new
SqlConnection(@"server=MRA\DKEKB017;uid=sa;pwd=mssql;database=DKLink");

SqlDataAdapter da = new SqlDataAdapter("SELECT * FROM test", cn);

da.Fill(ds, "test");

return ds;

}

in app I use this code:

localhost.Service1 s = new SmartDeviceApplication1.localhost.Service1();

s.Url = "http://mra/WebService/Service1.asmx";

DataSet ds = s.Select();

after this I get exception
 
K

konsak

Roman Moiseenko napisal: > Hi!
I'm developing application for Symbol MK 2000 based on Windows CE.NET 4.1.
My app using web method returning DataSet. After I calling this web method
app throw PlatformNotSupportedException.
But exact application running on Symbol MC 50 (based on Windows Mobile 2003)
works fine. What difference?
Hi!

Yesterday I had the same problem. On my PPC2003 everything goes OK, but
on CE.NET 4.2 while receiving DataSet app throws
PlatformNotSupportedException. It was happening because on CE.NET 4.2
there was missing CultureInfo for Poland, so I added (in WebMethod):

ret = new DataSet();
ret.Locale = new System.Globalization.CultureInfo("en-US",true);

and now workes fine.

Konrad.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top