I have to write a windows forms application that will run on tablet PCs with Windows 7.
This application will handle a stock taking on a warehouse with no connectivity to our central ERP. the user will scan the barcode label and the application will have to keep the data locally.
At the end of the operation the user will be able via LAN to upload the data on our ERPs table.
thus my question is what is the best way to keep the scanned data locally?
Option 1: Simple Text files (custom txt or XML)
Option 2: SQL Server compact edition?
Option 3 : ????
I don’t quite like the idea of text files as i have to open and close them every 30-40 seconds that the user will scan labels. Is SQL Compact the best way to go?
If you are only storing something simple like a SKU and quantity, and not modifying/replacing values, a text file will be extremely fast and simple. You can open a text file for append and just add lines on the end, then close the file. You could also use XML and serialization, but if there are just a couple of values then a plain text file format would be simplest and serialization will add development labor and has more potential for performance issues, deserializing, updating, then reserializing the object back to disk over and over.
A DB might be necessary if you want to have relational data, or if somehow multiple users/devices could access simultaneously, or if you need rowset operations for data modification. If you use any db it will also access the file system every time there is a new row, same as using a file.