Quote Originally Posted by Shaggy Hiker
If you can't do replication, I would be considering pushing XML across a TCP connection. I did this to push tables up to a PPC (both running .NET, but neither XML nor TCP is unique to .NET), and to push tables back down.
Could you give me any code snippets on TCP connections - how you actually accomplished this?

Quote Originally Posted by Shaggy Hiker
Oh yeah, and do you really want to delete the whole DB? Creating one on the fly isn't all that much trouble, and it would be somewhat simpler to push tables either way if the DB existed, so instead of deleting the DB, why not re-create it as an empty DB?
Our PPC DB creation is done in an interesting way. First we read a config table on the network SQL DB that tells us the names of the VIEW's that feed the PPC DB. Then we SELECT * from each of these views (on the PPC) and make tables in the PPC DB with column names and datatypes that match the VIEW's and then pump the rows into the PPC DB. Plus - as an added security benefit - the WINDOWS PW that they enter on the PPC to open the connection to the NETWORK DB is used as the encryption pw for the SQL CE DB on the PPC.

The reason we delete the PPC DB on 3-failed attempts is so that if the PPC gets lost and found by some student they cannot review data on other students.

We can add fields to the VIEWS on the network side and they appear on the PPC without any changes to the PPC app. We even store the SELECT statements that the PPC app uses for display on the network side - so that we can modify them and add new functionality without changing the PPC app.

It's pretty quick and simple to re-sync using the method I described.

And as I said - this is where my problem comes up - we were read-only on the PPC up to now - so deleting the DB was no big deal. But now that we will be writing data and saving it on the PPC I've got to protect that entry so the user doesn't experience a loss of data.

Basically I've got gym teachers that have a network app that they can run to load "stats" on phy fitness tests. That's been in place for a year now. They want to basically leave the desk with the PPC and mark those stats on the PPC (in the field) - come back to the desk - get into the network app and "suck" the info back from the PPC - populating the grid on the network app automatically - be happy that all kids data came over - no new kids in the class - stuff like that. Hit SAVE and the network app basically writes the data it sucked from the PPC back to the network database.

So the PPC DB is really just used to allow the PPC APP to show grids of students. The data they mark on the PPC needs to be saved outside the PPC DB - as you said, maybe XML file.