need help about binaryReader/writer or random acce

DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: need help about binaryReader/writer or random acce

  1. #1
    Join Date
    Aug 2005

    Question need help about binaryReader/writer or random acce

    hi everyone...
    i'm a newly member here.
    i got some questions about using binaryWriter and Reader with Array.

    my new project requires a user access (register & login) application. all the user data (username & password) have to be stored in a DAT file.
    i usually use strem reader/writer. i don't know about binary or random access (for binary).

    I really need helps from all u guys.


    if u can provide examples code, it would be awesome
    full code, that's gonna be better :P

    thx in advanced... (24 hours reply required... please...)

  2. #2
    Join Date
    Nov 2003
    Alameda, CA
    username and password in a data file??? which kind of security is that?

    To write two strings in a binary file:

        Dim f As Integer
        f = FreeFile
        Open "c:\s.dat" For Binary Access Write As f
        Dim u As Variant
        Dim p As Variant
        u = "My user account"
        p = "My password"
        Put f, , u
        Put f, , p
        Close f
    and to read them:

        Open "c:\s.dat" For Binary Access Read As f
        Get f, , u
        Get f, , p
        Close f
    The strings must be in a Variant so VB knows how to convert them from the file.
    But careful: anyone can open the file in notepad and read them!

    "There are two ways to write error-free programs. Only the third one works."

Similar Threads

  1. Database & Random Numbers
    By Suze in forum VB Classic
    Replies: 2
    Last Post: 05-10-2005, 03:41 PM
  2. random() and srandom() unresolved links
    By ozmanbozman in forum C++
    Replies: 25
    Last Post: 02-17-2005, 06:39 AM
  3. ADO random selection
    By rudy rusli in forum VB Classic
    Replies: 2
    Last Post: 03-22-2002, 08:43 AM
  4. random numbers
    By max in forum Java
    Replies: 2
    Last Post: 04-30-2001, 03:08 PM
  5. Replies: 0
    Last Post: 08-25-2000, 07:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center