I'm a bit stuck with this one... hope someone can help.
I'm trying to develop an application that will run on a pocket PC with Windows CE 4.2
I'm using .Net 2003 and the application is in VB.Net.
I can run the application on the pocket pc fine (ie. form paints, buttons work) , until I need to connect to Sql DB on the server.
When I try to create a connection object (Dim dbconnection As New SqlClient.SqlConnection)
I get an error stating .. "This application (test.exe) requires a newer version of .Net Compact Framework than the one installed on the device" .... "could not load System.Data.SqlClient.SqlConnection from assembly System.Data.SqlClient Version=1.0.5000.0"
The version that it is looking for is. 1.0.5000.0 . The VS2003 is using this version.
I've downloaded the compact framework v1. sp3 , ran all the cabs on the Win CE device ... it looked that it installed fine.... but the problem still exists.
Help Please..
Derek

Win CE 4.2 and Smart Dev Application question
SanjayAgrawal
That is probably because of firewall issues. The fact you can access shared folder does not mean you have access to SQL Server port (though it’s certainly good sign). Please follow troubleshooting procedure outlined in the second link, step 3. This one should be helpful as well:
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=335660&SiteID=1
HeHeHeHeHeHe
Ilya,
This is the problem.. I do not get the message .. "port is open" .. (I feel little stupid now)
I tried to simulate this on a laptop pc where I started a win CE emulator and accessed this application over the network. The laptop is on the network and I can run anything that I develop except when I try to run Emulator-> application from server's shared folder.
I get the same result as if I was running it on the actual hand-held device.
If I run this application on the server (ie. emulator on the server), everything is fine.
I also noticed that I don't see ALL of the shared folders when I connect via remote CE device. I only see windows standard 'shared documents'.
The network is setup for a workgroup rather than a domain , and while I can assign the laptop to the same workgroup, I can't do this with the CE (or at least I didn't see it anywhere).
Getting back to the port issue.... How do I enable it
I tried specifying the port in the connection string but that didn't do anything as I didn't think that it would but...
I was also trying to find any documentation on setting up an application like this, but there wasn't anything that would give me enough details to stop bugging you.
Derek
Fuhrer
Ilya,
I can connect to the server SQL db from another PC using the same wireless Lan.
I can connect to the server SQL db using the emulator (on the server PC)
I ran vxutils and it didn't find anything.
The TCP/IP port on the server is 1433 (default)
The server is setup to use both windows and server authentication.
I've tried different connection strings where:
I used the server name, server ip address, specifying user id/password
with trusted_connection true/false , integrated security =SSPI and not
I can connect with at least one of the connection strings from everywhere except from the Win CE device.
The device is connecting through the same wireless Lan as the 'workstation' that I used.
I still can't connect. and I'm seriously thinking about taking up smoking ..
Derek
BogN
I ran the cab (I think that ran the right one)
I can create the connection object without error .... thanks
Now, I'm getting "could not find resource assembly" when I try to open the sql connection.
Derek
vonWinter
Please see this:
http://blogs.msdn.com/netcfteam/archive/2004/08/06/210232.aspx
And this:
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=270532&SiteID=1
ethan23m
You device sure can run generic CE 4.2, but it's not "Pocket PC" in that case. Since Windows CE is modular OS there might be a big difference.
SQL Client (and SQL CE) CABs are included with VS 2003, here's the default location:
%ProgramFiles%\Microsoft Visual Studio .NET 2003\CompactFrameworkSDK\v1.0.5000\Windows CE\wce400
CAB file name is sql.<os>.<cpu>.CAB. Unlike PPC 03 which is ARMV4 only (not to count x86 emulator), CE 4.2 can use any CPU type, so you'd need to pick the right CAB.
As to "all" in the CAB, that is bad naming, sorry about that. It means there's support for all locales; it does not mean it includes everything.
mofo7
Ilya,
whatever the device is (it's a small hand help PC) it is running Windows CE .Net 4.2
If it makes a diffrence.
As far as the SQL Client cab...
I thought that it would be in the NETCF in the *all*.cab files. I was obviously wrong.
Where can I find the required cab file
Derek
xrayb
Don't give up just yet; we will get to the bottom of this. Believe me, it's possible to connect to SQL, just not as easy as it used to be due to multilayered security features introduces in recent years.
If you run vxUtil’s port scan tool (from port 1433 to port 1433 for speed), it should explicitly say "Port: 1433 is open".
If you don't see that, port is closed and your attempts to connect will fail. Is that what you mean by “I ran vxutils and it didn't find anything” – there’s no output on port scan
Ravenbutterfly
Ilya,
Thanks for your help.
I ran the proper cab and the message is a bit more meaningful.
However; I get a message "server not found or access denied"
I can ping the server from the hand-held device (win CE 4.2), I can access the shared folder (where the application resides), I can run the application but I can not connect to the server db.
To test this, I ran the same application using the emulator and I can connect without a problem. (The connection string is the same as is the user id)
So, why does the application connect using emulator but it doesn't connect to the server when running it on the actual device.
Derek
xPLaR
First of all, your Pocket PC device (if it's indeed Pocket PC device) does not run Windows CE 4.2, it runs Windows Mobile 2003 for Pocket PC. Even though Windows Mobile is based on Windows CE, there's a significant difference between these two.
As to the problem you're having, please make sure to install SQL Client CAB on to device. SQL Client is not part of NETCF and need to be installed separately. You can check if it's installed in "Remove programs" applet.