Log in

View Full Version : Really Simple question.......


KP
08-17-2005, 04:39 PM
Hi there.....

Am new to the whole Pocket PC scene. I may be trying to run before I can walk as well but is it possible to use the Pocket Pc (with the necessary attachments of course) to interface directly with an SQL database on a server? (Its an Intermec 730 if that makes a difference)

I am having untold problems with creating/populating/replicating a copy database on the Pocket PC and really all I want and need to do is to use the Pocket PC to run functions/applications but taking data from and send updates to the database on the server.

A colleague here says it cannot be done.... is he right and do I buy the beer :cry: or are the drinks on him?? :D

Thanks in advance

SteveHoward999
08-17-2005, 07:52 PM
Not certain if you can interact directly with the database on the server (surely you could by accessing asp pages on the server???), but you can install a database on the PDA and have it synchronise/replicate with the server copy. Have you looked on msdn?

--

Sven Johannsen
08-18-2005, 02:37 AM
A colleague here says it cannot be done.... is he right and do I buy the beer :cry: or are the drinks on him?? :D

Thanks in advance

http://www.microsoft.com/sql/ce/productinfo/overview.mspx

Have one for me :beer:

KP
08-18-2005, 08:22 AM
Thanks for that - but before I start celebrating I obviously did not explain myself properly.

I have explored the SQL CE route. The problem I have is that I need to have immediate updates to the main server from the Pocket PC (if possible). I thought of having a "wireless" update to the SQL server from the SQLCE database, but if I can do that then surely I must be able to send the information directly to the Server?

Perhaps if I expand the problem... We have items moving through a factory. There needs to be a control system to identify where each item is at any given time. So we have Pocket PCs reading tags when it passes each section. My applications record that the item is in a particular section on the Pocket PC, but I need that information to be passed back to the main SQL server. At the moment this means the device has to be replaced in the base unit and the data sucked down the USB cable. I was trying to do this remotely but if I am doing that remotely then surely I can update the main server remotely and cut out the SQL CE database?

Thanks again for your advice...

phunkynutz
08-18-2005, 09:58 AM
Do the Pocket PCs have a constant network connection (e.g. WiFi). If so I would personally recommend a Web Service running on the server, which the application on the handheld can then call to update the database in real time.

This is probably not the most elegant solution in the world, but I've seen this done before and it works quite well.

KP
08-18-2005, 10:51 AM
Thanks for that...

The Pocket PC's can certainly have a Wifi connection... they haven't at present but it was the intention in the longer term. Guess that needs to be brought forward!

If I understand you correctly I need to set up a Web service on the server. Does this get round using SQL CE on the Pocket PC, or do I still need to have that running and update that database, then replicate the changes via wifi on the server?

Sorry if I sound a bit dense but all this is new to me I'm afraid and it's a bit scary!! :confused totally:

phunkynutz
08-18-2005, 04:01 PM
Having a Web Service on the server would remove then need for any database on the PDA. The software on the PDA would get its data (and update it if neccessary) by calling the Web Services. The Web Services would then update the SQL database.

Sven Johannsen
08-18-2005, 07:29 PM
I'm certainly no SQL or SQL Server expert, but the overview text "SQL Server CE enables straightforward, efficient access to enterprise data whether a device is always connected or intermittently connected to the computer running SQL Server. Remote data access exposes data in SQL Server 6.5, SQL Server 7.0, and SQL Server 2000 databases through remote execution of Transact-SQL statements and the ability to pull record sets to the client device for updating.", implies to me that a connected device would have direct access to the SQL DB. It then goes on to discuss replication for disconnected devices. Obviously you need to be connected, somehow, and the comments about Wireless discuss this, but if you are connected, I would expect you could have a direct front end to the SQL DB. I could certainly be way off base, but it would seem that is possible to me. I've used Access as a direct front end to Oracle data this way using ODBC.

KP
08-19-2005, 03:54 PM
Thanks for the help all. Looks like a steep learning curve on Web Services for me!

Have a week off next week - Reading "Web Services Essentials" on the beach should cause a few strange looks!!

phunkynutz
08-19-2005, 04:17 PM
Sounds like a fun way to spend your holiday ;o)

If you are going down the WebServices road, I would highly recommend using Visual Studio 2003 .Net. It has some useful templates and wizards that make writing simple WebServices really quick and easy.

KP
08-19-2005, 04:50 PM
I may be forced to imbibe a beer or five! :beer:

We are using Visual Studio 2003 .Net, but to give you a clue where I am starting from the first google search was for "Web Services Idiots"!! :?

Sven Johannsen
08-19-2005, 05:56 PM
I may be forced to imbibe a beer or five! :beer:

Well, if your friend's paying for them :wink: And if not, sounds like a business expense to me. :)