By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,654 Members | 1,580 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,654 IT Pros & Developers. It's quick & easy.

PPC

P: n/a
How do I access a specific file if it is in the Pocket PC?

Thank you!

Gustavo Arriola
Oct 9 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
I haven't worked with a PPC in some time and thus a bit rusty, but looking
over some of my code, here is a simple example of reading a text file that
is in the application path and displaying the results. The commented out
code is for larger text files.

Private Sub btnRead_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnRead.Click
Dim BasePath As String =
System.IO.Path.GetDirectoryName(System.Reflection. Assembly.GetExecutingAssembly().GetName().CodeBase )
Dim Path As String = BasePath & "\Test3.txt"
If System.IO.File.Exists(Path) Then
Dim sr As New System.IO.StreamReader(Path)
MsgBox(sr.ReadToEnd)
sr.Close()
sr = Nothing
'Dim fs As System.IO.FileStream = System.IO.File.Create(Path)
'fs = System.IO.File.OpenRead(Path)
'Dim b(1024) As Byte
'Dim temp As System.Text.UTF8Encoding = New
System.Text.UTF8Encoding(True)
'Dim s As String = ""
'Do While fs.Read(b, 0, b.Length) 0
' s = s & temp.GetString(b, 0, b.Length)
'Loop
'MsgBox(s)
'fs.Close()
'fs = Nothing
End If
End Sub

"Gustavo Arriola" <gu************@hotmail.comwrote in message
news:%2***************@TK2MSFTNGP06.phx.gbl...
How do I access a specific file if it is in the Pocket PC?

Thank you!

Gustavo Arriola

Oct 10 '07 #2

P: n/a
I'm sorry, I forgot to mention that attempt to access to the file from a
desktop application and not from same Pocket PC.

Thanks!

Gustavo Arriola
Oct 11 '07 #3

P: n/a
The idea of this is access to a database that is located in Pocket PC and to
make a synchronization, nevertheless did not want to do it by means of the
IIS since all versions of Windows do not have it.

Gustavo Arriola
Oct 11 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.