VB10 Trying to create file, save and retrieve information used by my application-VBForums
Results 1 to 6 of 6

Thread: VB10 Trying to create file, save and retrieve information used by my application

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2009
    Posts
    18

    VB10 Trying to create file, save and retrieve information used by my application

    In VB 6 all I had to do was

    Open fileName for Random as 1 Len = recordLength

    then Get records or Put them into the file.

    In all their wisdom, Microsoft developers have decided this simple method of saving information was no longer needed I guess. I am trying to update my VB6 application using VB10 Express. Is there any way that I can do these (previously) simple tasks? Thank you.

  2. #2
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,241

    Re: VB10 Trying to create file, save and retrieve information used by my application

    Yes. There are several (currently) simple (in my opinion, simpler) ways to write and read files. I suggest you start here at MSDN with the My.Computer.Filesystem methods.
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Aug 2009
    Posts
    18

    Re: VB10 Trying to create file, save and retrieve information used by my application

    Thank you, Fiddlin. This is much easier than anything I have seen in any VB10 book I have. However, it still does not quite cover what I am looking to do.

    In my application, I have (in VB6) custom data types. One would be called gameType. This type would contain team names, field name, game time and other data pertinent to the game to be played. In saving or retrieving these data types, I would just Put or Get the gameType into/from the file. In VB10 I understand that there is no creating data types, but am guessing that creating custom Objects is the way to go. My dilema is how to save the objects to file?

  4. #4
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,241

    Re: VB10 Trying to create file, save and retrieve information used by my application

    Not a problem. VB.Net has versions of Put and Get plus the all new, singing and dancing Serialization classes. See this summary from about halfway down.
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  5. #5

    Re: VB10 Trying to create file, save and retrieve information used by my application

    It is sure that there are several simple ways to write and read files.

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Aug 2009
    Posts
    18

    Re: VB10 Trying to create file, save and retrieve information used by my application

    Thank you again, dunfiddlin. You would think that these would be mentioned in one of the books that I purchased. Considering how well they can sing and dance, and all.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.