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.
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.
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?
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.
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.
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.