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(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles btnRead.Click
Dim BasePath As String =
System.IO.Path. GetDirectoryNam e(System.Reflec tion.Assembly.G etExecutingAsse mbly().GetName( ).CodeBase)
Dim Path As String = BasePath & "\Test3.txt "
If System.IO.File. Exists(Path) Then
Dim sr As New System.IO.Strea mReader(Path)
MsgBox(sr.ReadT oEnd)
sr.Close()
sr = Nothing
'Dim fs As System.IO.FileS tream = System.IO.File. Create(Path)
'fs = System.IO.File. OpenRead(Path)
'Dim b(1024) As Byte
'Dim temp As System.Text.UTF 8Encoding = New
System.Text.UTF 8Encoding(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" <gustavoarriola @hotmail.comwro te in message
news:%23F7511kC IHA.484@TK2MSFT NGP06.phx.gbl.. .
How do I access a specific file if it is in the Pocket PC?
>
Thank you!
>
Gustavo Arriola
>
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.
Comment