What are my options when it comes to storing values in VB.Net

Morning,

I need some help with storing some values in VB.NET.

I am using Visual Studio 2012 Pro.

I have a datagridview on one of my forms which is being linked to an access 2010 database and I would like the user to select (highlight) one of the "rows" in the DGV which contains values in 5 columns and click a button called next.

When this button is clicked I want the values of this row saved temporarily somewhere so that it can be used elsewhere in my application until I tell the code to clear it.

My question is where can the values be saved?

Example of what the stored values (rows) look like is below, essentially its only one block of information.

Animal: Dog
Color: White
Sex: Male
Legs: 4
Tail: Yes

At first I was thinking I could save the values as keys in the windows registry, but I am worried maybe it would be too much strain on the registry. So then I was reading about the “Resources” area in Visual Studio, but this area looks to be used for a different purpose such as locale and images.

So I would like to know what my other options are. The values will be different each time as it all depends what row in the DGV the user selects. All rows have an ID which is generated by access upon creation.

I would like if possible to store the values within my application, but NOT hardcode them.

Kindly advise of what options I have available to accomplish this and provide any resources I can use to read up on it.

Regards,
N
LVL 1
KevinInformation TechnologyAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Éric MoreauSenior .Net ConsultantCommented:
behind your datagridview, you surely have a DataTable (or a dataview or a dataset) to which you bind.

The DataSet can easily read/wirte to XML on disk. It is built in ADO.NET. Have a look at http://shabdar.org/c-sharp/120-read-write-xml-data-using-adonet-dataset-and-c.html for an example
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
KevinInformation TechnologyAuthor Commented:
Thank you.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.