Is it possible to read data in txt files (which is located on PC ) using smartdevice ?
I am developing a software for smartdevices(WinCE4.2) with VS2005 and 2003. I have to work wit big amount of data so I choose to work with sqlCE ,faster and reliable. at this point I need to transfer data from pc to smartdevice.
* copy txt file to smart device.
* start transfer operation (which reads data from txt file on Smartdevice and write to SDF file)
because of the limited memory capacity smartdevices I need to read data from PC.
I mean I want to make this transfering operation while the device connected to the computer with cradle.
so if someone can help me about this topic I will be happy
Best Regards,
[660 byte] By [
ercan_06] at [2007-12-25]
sorry but I am new with these devices.if you can describe more detailed I will be happy
do you mean that only way to do that is setting up a network connection by usb or wireless connection?
ercan_06 wrote: |
| sorry but I am new with these devices.if you can describe more detailed I will be happy do you mean that only way to do that is setting up a network connection by usb or wireless connection? |
|
if your machine is sync'd, or on the network, and supports SMB, like Ilya said, you simply address the text file in question like you would any network resource on a desktop. if you're sync'd, I suspect you'll need to be running the virtual machine device driver on the PC.
hi, thanks all for help,
yes device is syncronized with computer(you mean activesync?).I can access to device "mobile device" icon when its connected pc with cradle.I can access the text file which is located on smartdevice easily:
Dim
Path As String = "\temp\data.txt" (data.txt exist on smartdevice)Dim
sr As StreamReader = New StreamReader(Path, System.Text.Encoding.UTF7)without doing any adjustment device can connect internet (with ie.) over pc when connected with cradle.I thought if can connect to the internet there should be a way to show the location of my data.txt file.but I did not find how
how can I understand that device supports SMB?
or what should I type to PATH
best regards
You need to use RAPI to access files on devices from desktop. There's no way to do it with code you posted. OpenNetf.org has managed wrapper for RAPI.
Device, on the other hand, can use similar code with UNC path to access network file share on desktop. That would work assuming your device supports SMB client.
Since you’re using custom CE device, you’d need to ask device manufacturer if SMB client is supported by your device or not.
hello ,
I used RAPI before to access device files from desktop.after I see the usage of RAPI I thought that there shoulbe a way to show the location of files stored on Connected PC.maybe a dll for reading pcfile.
but now I want to do reverse of it.accessing files on pc using device.
the sample code that I send was just for description about my needs.(can I open and read lines of files like this).
openning file is simple but I could not find the tell the location of files which is stored on pc.
I asked to manifacturer about support of SMB client and they told they need to know :
-- what you mean about SMB client and some device properties?
That works the same way as Windows networking for PC works:
1. Server/PC creates a share in which files are resides.
2. Client accesses that share using UNC paths. Client needs to know PC name, share name, file path and file name. If you don’t have that information, you can not access the file just like you can’t send mail without address.
All that is done via SMB protocol which needs to be on the device. Pocket PC devices have it, SmartPhone devices do not. In case of custom CE device it’s up to OEM to add it or not. I’d say it's not good if your manufacturer has no idea what’s in the device. You can just try it though.