Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 149,913 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 2,194 people online right now. Registration is fast and FREE... Join Now!




Reading/writting ASCII database files.

 
Reply to this topicStart new topic

Reading/writting ASCII database files.

ISUMiddy
25 Jan, 2008 - 07:54 AM
Post #1

New D.I.C Head
*

Joined: 25 Jan, 2008
Posts: 5

I need to read a .ndf (neutral database file). I just started using VB 3 days ago and I want to read character by character through the code and rewrite each character value on a separate line. I was trying to use StreamReader then convert the contents with the Asc() function, but that only worked for the first character in the file. Is there a way to ready character. I am also using the StreamWriter. Is there a way I could loop a read-convert-write move to next character? Since I am unable to upload the .ndf file I included a small portion of the file below. Any help would be greatly appreciated. THANKS!!!

This is what I used to read the code

CODE
        Dim strContents As String
        Dim objReader As StreamReader
        Try
            objReader = New StreamReader(FullPath)
            strContents = objReader.ReadToEnd()
            strContents = Asc(strContents2)
            objReader.Close()
            Return strContents
        End Try



here is a small portion on the file I am working with.

0ߐְ@P`Ґ @`$@-p7>FK0QSVPVV T@QLF?6@-"` 0 0p̀` @ʐ@p`P0P @
0` @ 0 
` p
0  00P```p 0p``Pp0 P P0 @ ` @@pp`@ @pP @`0p` P P`Pp PP pp `p p 00`@`0 P0`00PP0
p`0 ` 0
Pp@ 0@ pP @`0  @P p@PP`PPP@ P`pP P `p p0``pPpP 00@@`@0 P p0 00`ppP` p `@pP0`0P  0 P p P `p p0PpP`P ` P0@`0p@ @` `P  pPp0pP0Pp p`P0@P`0`ppp0`  `0p@  Pp0pp@@0 0 0 `  p@P p  P А0Pp0 p    Pp`p  PP 0 PPPp`p `P `0@`P0 p0p0  00`@pP0`P@pp@p0 P0``@@``pP 0@0`p P@P` p ` ppP p  P@` @` p0`pp0p P@pp p0@`@PPppP`p P Pp0а `0`@p@p@ PpPp`` @
0 0 P
P `0` p ppP``@0 ` `P0 p


` pp @P0``00א׀0ݐ`p"p*3 :pAE0JL@NM0M0K@HCp>7p0 (P 0 װѰ@0ư Аِސ@P `  p @  `  
`P @pp
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 02:06PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month