|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Database or else? QU from newbie
As a very, very newbie in VB.NET, after a lot of learning, I feel like one that can't see forest becouse of trees.
I was thinking to make a solution (for exercize purposes) that should recive some data and save it. So I can not remeber nor find in numerous and very large books aboutprograming in VisualBasic.net, do i need to make application that will enter that data into some (any) database, or is it possible that application records and keeps data for next use itself (like in games "Save game" comand). If there's anybody willing to bother with such a novice, please answer me. |
|
#2
|
|||
|
|||
|
intersting
Well, it certainly sounds like you're a newbie. Since you're just starting I would recommend changing to c# - the capabilities are bascially the same (+ more when you get good enought o understand them). The difference is the syntax but you pretty much access the classes the same way.
For your database question - is this a web or windows application, you might find some difficulty having a "save as" command through the net, well at least loading and resuming some session from the net. For windows, try a database server like sql (no one uses access professionally) and then try some xml techniques if you want some good experience. Before you start, try to figure out what you want to do - 1. Decide the accessability you need, that might determine if it is a web application or a windows app. 2. Determine the data you need to store (and how it interacts) 3. Get your business rules down; say how the data interacts - an example is: for each new record, the creator gets an email or some flag is set or something like that. 4. Try to break the application up into components or seperate assemblies or classes - it will be easier to modify one part and reuse it later in your next project. Those are the most simple steps. |
|
#3
|
|||
|
|||
|
More details from my side
Thank you allready.
But.. I'll trie to make more egzact. I was thinking about Windows application that will administer for a school needs. I am persuming that school ( specialy where I live) is not rich enough to have SQL database. So I wondered if it is possible to make application that will store, update and delete data, as well as have possibilities for certain filters and queries, but without using ADO.NET, then ruther as a simple Windows Application. If my qu is not so dumb, please answer me. |
|
#4
|
|||
|
|||
|
If you don't want to use ADO.NET, MS Access, or SQL Server, you can store the data in a text file. I'd recommend an xml file.
You can use the System.XML namespace to open and add data to the file pretty easily. Although this is c# syntax, here is an example: // create a new xml document System.Xml.XmlDocument xmlDoc = new XmlDocument(); // open a doc from the file system (MAKE sure you know the location of the file) xmlDoc.Load(_DocumentPath + @"\MyXMLFile.xml"); Here is an XML doc example: <?xml version="1.0" encoding="utf-8" ?> <PersonInfo> <person>John Doe</person> </PersonInfo> As long as there is a root node in the xml file, it should be ok. Practice reading nodes from the file: // Read Nodes: string myString = xmlDoc.SelectSingleNode("/PersonInfo/person").InnerXml; This will get the inner text of the person: "John Doe" Here is what you can do: Make a pre-populated xml document - you can use my crappy example as a starting structure - but it's really useless Make the doc so it contains the information you need to store. Try using attributes in the xml document to store data effeciently (without unneccesary nodes for each person property)Once you get good at selecting the data and populating it; create a UI that will let you populate the data file. From there, I can give you more examples if you like to insert nodes and node ordering, etc. Enjyy ![]() |
|
#5
|
|||
|
|||
|
Thank you
Thank you very much.
Your answer explained a lot to me. |
|
#6
|
||||
|
||||
|
If you're only dealing with, say less than 200 people (records), then an XML file would be fine. But for anything more I'd definately recommend you use a database. There are serveral free RDBMS (database systems) available, including mySQL (www.mysql.com) (recommended), and postGres. Both work fine on the Microsoft platform and with ASP.
|
![]() |
| Viewing: Dev Articles Community Forums > Databases > Database Development > Database or else? QU from newbie |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|