Archives

Meta

Visual Studio 2008 Smart Device project connect to sql server.

A friend of mine ran into some trouble with a smart device project these days. At first with internet connectivity on the pocket pc emulation. After some heavy swearing and a lot of tries he managed to connect to the network and then to
the sql server. There are 2 steps here:

1.Connect to the network

2.Connect to the server

1.To connect to the local network through the pocket pc emulator you must install virtual pc and Windows Mobile Device Center.

After you create the smart device project in visual studio you must enter Tools\Device Emulator Manager, choose the type of emulator you are using right click connect and right click cradle.

cradle

In the emulator you must go to file\Configure to the Network Tab and enable the first checkbox.

pocketpc emulator network settings

Check in the windows mobile center program if it says connected in the lower left corner. If it didn’t connect reset the settings connect mode to Bluetooth or something else, click ok, and then reset tot DMA again.

2. The sql connection string mustn’t have the name of the server. You must use the ip and the port of the machine from the network where you have sql installed, for example: “Data Source=192.168.0.30,1433;”.