Groups | Blog | Home
all groups > dotnet compact framework > july 2005 >

dotnet compact framework : WinCE and Pocket PC difference working with web-service



Roman Moiseenko
7/28/2005 12:00:00 AM
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

Roman Moiseenko
7/28/2005 12:00:00 AM
Many thanks! All works fine!

konsak NO[at]SPAM interia.pl
7/28/2005 3:13:24 AM


Roman Moiseenko napisal: > Hi!
[quoted text, click to view]
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.
AddThis Social Bookmark Button