Create Struct then write to Random Access File

I need to create a random access file. What I am trying to do is query a MySQL database then return the results then write them into a file to be read from later. I think I should create structs then write the data to the file. Then read the file and write them back to the structs. However I am not sure how to start. I can query the database but everything else I have little knowledge.

If someone can help me with some example code to start me off Id appreciate it. I would specifically like help that sends my Query Results into a struct then send the struct into random access file then read from the random access file back to the struct. I;m not even sure how to create a Random Access file in C#. Any help to start would be appreciated. Thanks.
LVL 1
SaltyDawgAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
margajet24Connect With a Mentor IT Business AnalystCommented:
use the Serialization Capability in .Net

in that way, objects can be transformed into a xml or binary format data
then later on can be transformed back to objects..

0
 
SaltyDawgAuthor Commented:
I'm not too familiar with Serialization. Will I be able to get the same results as I would with a Random Access File? Could you point me to a place where I can find a good example? I looked it up but found some terrible tutorials online. Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.