SQL update from Mobile 6
-
jeudi 1 mars 2012 12:10
I create applications using VB with VS2008. I have a customer who has several Psion WAP3 mobile devices running Win Mob 6.1 Professional. Also used is the Psion sdk V5.3. The devices collect data in batch mode, are placed in a 4 bay ethernet connected cradle and then using SQL commands directly update a SQL database running under SQL Express 2008 on a VM server running Windows Server 2000. The software on the WAP3 uses the standard SQL client (sql.ppc.wce5.armv4i.cab) installed manually.
The system has been running well for many weeks but suddenly I am getting errors at the start of the data update process. Error messages are saying that the device is unable to connect to the SQL server. The error message gives the correct IP and name for the SQL server. When the device is in the cradle it is possible to ping the device from another PC on the network. It is not possible to ping the server from the device because, in their wisdom, Microsoft have removed the ping facility from the latest version of Win Mobile. The device is indicating that it has an IP address and the networking guys on site have done a remote desktop from the device to the SQL server. They insist therefore that there are no network issues. Now I am very aware that the cradle is actually 4 x usb to ethernet converters each with its own MAC address so, using DHCP, the IP address is allocated to the specific dock in the cradle and not directly to the device. If you move a device from one dock to another it gets a different IP address. I do not know if there are any implications of this. I think I am correct in saying that all network settings on the WAP3 are default.
When we get this error other devices in the same or different docks in the cradle work correctly. I have even run VS2008 on my laptop in diagnostic mode, connected to the device VIA ETHERNET (not usb!) when the error occurs. Does this prove the integrity of the network?
No matter what we attempt, and I have had much help from the on site networking guys, we cannot get the device to see the SQL server. However, for no obvious reason at all, it starts working again. Typically this is the next day but I cannot be more specific on timescales. Also if I remove the unit from the customer site and bring it back to my office 'duplicate installation' it works right away but again I am unsure of any timing implications.
This has not happened to all units on site, but perhaps 3 or 4.
Every failure is at the same place when the software initiates the SQL connection but that is always the first task when the unit is placed in the cradle.
Is this hardware (WAP3, cradle, usb-ethenet converter), is it network?, is it software? is it SQL client? is it SQL server? Is there a timing issue?Any assistance appreciated!
Apologies for the length of this query.
Toutes les réponses
-
vendredi 2 mars 2012 19:25Any ideas anyone?
-
vendredi 2 mars 2012 20:38Modérateur
Windows Mobile (and Pocket PC before it was renamed) never had "ping facility". You can use 3rd part products instead, e.g. vxUtils. These are rather old (PPC 2003 or so) but should work on WM 6.
Your "networking guys" should know better then assuming particular protocol is working based on other protocol working. Try using vxUtils to do actual port scan on of the port(s) SQL Server is using.
Next, please make sure to print out errors from error collection on exception. That may suggest what exactly is the problem.
Finally, check log files on the server. May be as simple as running out of connection limit for either server itself or SQL Server Express.
This posting is provided "AS IS" with no warranties, and confers no rights.
- Proposé comme réponse ESLAM ELMOAWEN samedi 10 mars 2012 15:14
- Non proposé comme réponse ESLAM ELMOAWEN samedi 10 mars 2012 15:15
- Proposé comme réponse ESLAM ELMOAWEN samedi 10 mars 2012 15:15
-
samedi 10 mars 2012 15:17
you can use this code to check your IP address in all step
and you need to remove the proxy setting when you use a cradle
public string GetDeviceIP() { try { //Get Device IP String strHostName = ""; // Getting Ip address of local machine... // First get the host name of local machine. strHostName = Dns.GetHostName(); // Then using host name, get the IP address list.. IPHostEntry ipEntry = Dns.GetHostEntry(strHostName); IPAddress[] addr = ipEntry.AddressList; //return device IP return addr[0].ToString(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
public string GetDeviceIP() { try { //Get Device IP String strHostName = ""; // Getting Ip address of local machine... // First get the host name of local machine. strHostName = Dns.GetHostName(); // Then using host name, get the IP address list.. IPHostEntry ipEntry = Dns.GetHostEntry(strHostName); IPAddress[] addr = ipEntry.AddressList; //return device IP return addr[0].ToString(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
- Modifié ESLAM ELMOAWEN samedi 10 mars 2012 15:19
- Proposé comme réponse ESLAM ELMOAWEN samedi 10 mars 2012 15:22

