473,322 Members | 1,232 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Global application parameters

Hello

I'm starting to do a little application for fun with VB.NET and would like to store some information about the user (name, point already won), loaded from a Xml file after login identification. Is there a way to store those information easily in an object global to the whole application ?...

Thanks for your help
Nov 20 '05 #1
3 977
Add new item to your project: Application Configuration
Then have a look at System.Configuration.AppSettingsReader class
Dominique

"Gort" <an*******@discussions.microsoft.com> wrote in message
news:11**********************************@microsof t.com...
Hello,

I'm starting to do a little application for fun with VB.NET and would like to store some information about the user (name, point already won), loaded
from a Xml file after login identification. Is there a way to store those
information easily in an object global to the whole application ?....
Thanks for your help

Nov 20 '05 #2
Cor
Hi Gort,

You have to simple posibilities, the registry or as you stated a XML file.
For a XML file you can simpel use a dataset.

Do not be afraid, it is very simple to make a dataset

\\\
'Make a datatable with 8 columns
Dim ds As New DataSet
Dim dt As New DataTable("yourstable")
For i As Integer = 0 To 7
Dim dc As New DataColumn(Chr(i + 65))
dt.Columns.Add(dc)
Next
'And 12 rows every column filled with a value
For i As Integer = 0 To 11
dt.Rows.Add(dt.NewRow)
For y As Integer = 0 To dt.Columns.Count - 1
dt.Rows(i)(y) = y.tostring
Next
Next
ds.Tables.Add(dt)
ds.WriteXml("C:\yourtable.xml")
///
And to read it
\\\
ds.ReadXML("C:\yourtable.xml")
///

I hope this helps?
I'm starting to do a little application for fun with VB.NET and would like to store some information about the user (name, point already won), loaded
from a Xml file after login identification. Is there a way to store those
information easily in an object global to the whole application ?....
Thanks for your help

Nov 20 '05 #3
* "=?Utf-8?B?R29ydA==?=" <an*******@discussions.microsoft.com> scripsit:
I'm starting to do a little application for fun with VB.NET and would
like to store some information about the user (name, point already won),
loaded from a Xml file after login identification. Is there a way to
store those information easily in an object global to the whole
application ?....


Configuration Management Application Block
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/cmab.asp>

<http://www.palmbytes.de/content/dotnetlibs/optionslib.htm>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Cecil Westerhof | last post by:
With global.asa application variables can be set. Later can a script in your application change the value of those variables. But when IIS is restarted the old values are used again. Is there a way...
16
by: WaterBug | last post by:
When clicking on the following link from an email i.e - http://myserver/myapplication/myprogram.asp?urlvar1=some%20stuff&urlvar2=more%20stuff I get a server 500 error. With that same browser...
3
by: Steve | last post by:
Visual Studio 2003 / C# My application has 1 main form. On this form is a treeview object down the left hand edge and a status bar along the bottom. That is all. The tree view acts as my menu...
7
by: Michael | last post by:
Hi newsgroup, as the subject indicates I am looking for an advice using global variables. I am not if this problem is more about style then C. If its wrong in thi group, sorry. So I have a...
6
by: MechSoft | last post by:
Hi, I am new to C++ from C, I am a bit confused about using global objects in C++. I have a program that need to share some data(held in classes) between files, and of course I thought about using...
12
by: John M | last post by:
Hello, On Microsoft Visual Studio .NET 2003, I want to use some global elements, that can be used in each one of my pages. i.e I put a oleDBConnection on global.asax.vb How can I use it...
3
by: gordonfmoore | last post by:
Hi, for some reason? I learnt it was sensible/useful to put any parameters that I wanted users to be able to change in the global.asax file. So my code would look like: //in my page load...
4
by: Dom | last post by:
In C++ and VB, it is pretty easy to get a global constant, one that can be used by all modules. I still have a need for this in CSharp, but there is not easy way to get these. I can't, for...
2
by: arun1985 | last post by:
In the project i am using i am having the following code and when i upload it to the server.Its givig me the following error in the global.cs file. Server Error in '/' Application. ...
5
by: =?Utf-8?B?bWNxd2VydHk=?= | last post by:
Hello, I'm trying to enable an error handling package at the root of my web server by editing this file: C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\CONFIG\web.config In the httpHandlers...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.