I currently have a simple CSV file and a random access file of structure:
Public Structure actStock
<VBFixedString(13)> Dim Scan As String
<VBFixedString(15)> Dim SupRef As String
<VBFixedString(35)> Dim Name As String
<VBFixedString(8)> Dim Size As String
<VBFixedString(8)> Dim Price As String
<VBFixedString(4)> Dim Qty As String
<VBFixedString(13)> Dim AltScan As String
<VBFixedString(8)> Dim Test As String
There are 4 machines which need to share data-files. 2 Windows XP Tills, 1 Windows XP Main machine and a hand-held device. The hand-held is capable of accessing the random file on the Main machine(XP).
Both tills output a file [url removed, login to view] to the working directory (configured in settings file). What I need is the code for a VB.NET windows service (I do need the code not just an EXE as this must be able to be modified). The service will run on both of the tills and monitor the working directory for [url removed, login to view] changing size (This part of the code is done and can be provided if needed) On the size changing I want the contents of the file (CSV Format) appended to a file ([url removed, login to view]) on the main machine effectively joining the files. This is the minimum that is needed.
I will then need to read the same file (CSV) that was appended to the [url removed, login to view] (CSV) and capture the Quantity field (4 characters) and the Barcode field (13 charaters). I will then perform a binary search on the random file ([url removed, login to view]) [Also hosted on the main PC] to find the appropriate record and add the number in the quantity field of the csv (Which is an adjustment not the actual qty as in the random file) and add the values together to create a new value. I do NOT need this part done I already have the code using a filestream. I simply need to access the file with a filestream.
So to sum up I need. VB.NET code that can access a file hosted over the network on a different machine with:
VITAL: THIS MUST BE ON A SERVICE
On a windows forms project my current code works however when I make it a service I get access denied or IO exceptions all the time. So please ensure your code works as a service before reporting completion.
1. Any kind of way to append the contents of one file to the remote file
2. Filestream access to a file across the network.
You do not actually need to do the processing just the access and close down code for the files.
I am on a very tight schedule for this so I need the code by Monday 14th September.