Storing Info To XML File ?
Mar 23, 2011
I am trying to create a program that takes cd information (ARTIST TITLE COUNTRY COMPANY PRICE AND YEAR) and saves it onto a XML file.The info is entered into separate text boxes.The program should also store 3 cd in memory before batch writing it to the xml file?
View 6 Replies
ADVERTISEMENT
May 10, 2012
Hi, I've created a login screen for my application and defined the username and password using the following code
If UsenameBox.Text = "username" and PasswordBox.Text = "password" Then
Me.Hide()
Main.Show()
It works great however, I need the user to be able to set their own password using a registration form with the details being stored in a xml file. There are no security concerns with the password being stored in a text file as it's a mock login screen.
View 23 Replies
Dec 15, 2008
writing a program which stores and uses information on oil pipelines. I have a number of worldwide sites, which each have a number of pipelines. Each pipeline has a number of segments, and each segment has a number of properties like flow rate, temperature, pressure etc. There are also going to be a number of cases, so the temperature of a segment in case 1 might be different to case 2.
What is the best way to set this up in terms of objects and references? I�ve done a fair bit or reading about arrays, collections, classes and think there are a number of ways to �skin this cat�For example, if I wanted to reference the temperature in case 1, of segment 3, in pipeline 4, at worldwide site number 3, then can I do something with a load of objects and collections like the following?
site(3).pipeline(4).segment(3).case(1).temperature.value
Is it possible to have an object heirarchy, where an object has a parent object, and both objects have their own attributes and fields?
View 5 Replies
Jul 31, 2010
I am working on a media player, and I would like to setup a local playlist feature. I am using a single ListBox and its "Display-" and "Value-Member" properties. The display is the song's Artist and Name, and the value is the song's file path (i.e 'C:UsersUSERMusicetc.').To write the file path to the .txt file, I believe I can use the following code:[code]
View 18 Replies
Jun 22, 2011
I am making a program, obviously, and I require some assistance. I found an explanation on how to read information from a Text file and have modified it for my needs. Here is my (modded) version:
Public Function GetInfo(ByVal playlistname As String) As String
On Error Resume Next
Dim PlaylistInfo As String
[code].....
View 6 Replies
Oct 29, 2010
Ok, so I`ve been studying a bit of VB lately.. bought a few books and read lot`s of articles and seen hours of instructional videos, and I slightly start to get the hang of a few things.. :) I`ve recently started a fun little project, but I seem to lack a bit of knowledge to reach my goal. I`ll first try to describe my project:
[Cde]...
View 1 Replies
Jan 15, 2012
I've been searching around these forums for quite a while now, and can't seem to either understand or find what I'm looking for.I have a text file, that my program is always adding to it, it's format is like so:
Line 1: UserName (For User 1)
Line 2: FilePath (For User 1)
Line 3: UserName (For User 2)
[code].....
View 8 Replies
Jun 10, 2011
I am going to try to explain this the best I can I didn't develop the original version of this, or the part that rights it to the database.in our company, there is a program that takes PDF files and stores them in our mysql database as blobs. The blobs are attached to inventory items by the inventory items ID. they are basically certificates. That is basically all I know about it.
however, I was asked to show the PDF files for certain associates that may want to view them. ie, if a sales person looks up item 1234 and there is a stored PDF certificate for the item, be able to access the pdf and show it to the employee if they want to see it.The code that I found that was previously wrote to view the PDFs takes the blog, create the file in the app.path directory, and then uses shell to launch it like a normal PDF.
I don't have a problem using the adobe pdf reader to launch the file, but is there a more efficient way other than creating the file on any machine in our company where someone wants to view the PDF ?
[Code]...
View 7 Replies
Jan 26, 2009
Is it possible to store entire CookieContainer in a file and then retrieve it when needed?
View 5 Replies
Mar 17, 2010
I'm using the SaveFileDialog to save listbox info into a text file. The files save fine, but when you go to save the file, if you hit the cancel button, it will overwrite the previous file you saved, because it's name was the same and it seems to save the previous file as the new name for your next file. Is there any way to catch if the user clicks cancel, and then exiting the sub if they did?
View 2 Replies
Jul 22, 2011
i am very new to VB. I am working on file operation such as show files, copy file, delete file, show current directory, rename folder, make folder. My problem right now is with delete and copy file. I have a method of delete and copy but i dont know how to pass this method on a button.
[Code]...
View 8 Replies
Feb 6, 2012
I am trying to store 8 separate pieces of information in a text file (like a database) [but not a SQL database], consisting of integers and strings. How would I use an array to do this? Will an array collect data from text boxes (I also want to display the 8 pieces of information in separate boxes). also how would I save the text file so I can open it again or open a different text file (database?), from within the program?
EDIT: I see I need to use readline and writeline to read/write from a text file but how would I find specific data to show in my boxes?
View 1 Replies
Feb 10, 2011
Sequential Access File and storing them in an array?
View 16 Replies
Jun 14, 2009
MSDN only discusses strings, images, audio, etc.. but does not cover text files.
I have a text file with about 6k lines of short strings, each on its own line, added to my project's resources and I'm trying to .add each line to a collection. I've tried about 7 or 8 things, not all using StreamReader, but I can't find documentation on this anywhere.
Here is the last thing I tried:
Dim JunkStrings As New Collection
Dim sr As StreamReader = New StreamReader(My.Resources.shorts)
Do While sr.Peek() >= 0
[Code].....
I just can't find the equivalent to this that reads lines from a text file out of my.resources.
View 6 Replies
Jul 8, 2009
I have been tasked to create an application, for which the requirements may change over time.This application will be a data entry Windows application,of which multiple copies will be running.All data will be written to text (.CSV) files for validation before being uploaded to a remote mainframe system (iSeries).My application needs to store certain variable information in an external text (or XML) file; for example, the file path to shared resources (which may change over time),as well as the specific data fields required by the mainframe system.
My questionsare these: what is considered the best practice for accomplishing such a task, and how would I accomplish it?I am completely new to XML, so I don't even know where to begin, although I am sure that XML is the path to follow for what I am trying to accomplish.
View 1 Replies
Oct 4, 2010
I'm trying to create a program that will read in a custom file similar to a config/INI file and parse the data and store them into variables of a custom class. Essentially I want to be able to read in line by line, split the line by the space and then store the value into a class object's variable with the same name.
For example, I have a class called body.
Public Class body
Dim height As Double
Dim weight As Double
End Class
View 9 Replies
Nov 20, 2009
When I store a binary file in a MS Sql table & then retrieve it & write it back to disk the new file is always 1 byte bigger than the original file, no matter what the file type. Is this normal? The files all open fine in their respective applications, but I'm just wondering where the extra byte comes from & if I'm doing something wrong in my code.
Using con As New Odbc.OdbcConnection(conString)
Using cmd As New Odbc.OdbcCommand("insert into mytable values (?,?)", con)
Using fs As New IO.FileStream(filename, IO.FileMode.OpenOrCreate,
[Code].....
View 4 Replies
Sep 3, 2009
My xml files were looking a bit clumsy when i read them, what i have done now is to save them in the xml in this format:
vb.net <field>{value1|its partner value2}</field>
i noticed {|} this is the format that vb.net uses for arrays, i was wondering if that's an ok way to store things, on retrieval once i get the node value, what would be the best way to break up the {value1|it's partner value2} variables to use, explode the | and get parts (0) and (1)?
View 1 Replies
Jun 22, 2011
In the program I'm working on, there is a 'sign-in' form that pops up for the user to enter first name, last name, and DOB. What I want to do is STORE that information in a text file for FUTURE use by the program (i.e. displaying a list of all previous users of the program).I already know how to use streamwriter to write text to a file, but I would like for the text file to be stored within the program files and also for a new user's data to be appended to that file every time.
Do I simply add the text file to the project files? When I do that, its path is 'My Documents'. How will that affect the program when I publish it? I guess I just don't yet understand what happens when the program is finished and published. The code for the 'Submit' button on the sign-in form is pasted below. At the bottom, I've put a comment to indicate where I want to store the data to a file.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim TxtBox() As String = {TextBox1.Text, TextBox2.Text, TextBox3.Text}
For i As Integer = 0 To 2
If TxtBox(i) = Nothing Then
[code]....
View 13 Replies
Apr 3, 2011
I have an application that gathers data from a SQL database that is used by a 3rd party helpdesk application.My application is pulling out information of the number of hours worked by each engineer for the current and previous 2 months.Also as part of this process, my application works out the target hours for each of those months.
My application has 3 groupboxes whose label is generated at runtime. My application gives the Groupbox1.text the name of the current month, Groupbox2.text the name of the previous month, and Groupbox3.text the name of the month before that (e.g. Mar, Feb, Jan).
What I am trying to do is have 2 text boxes for each month where I can enter the number of engineer holidays taken and the number of public holidays if any. I want to store these values in an XML file, and I guess they need to be stored to match the Groupbox text (i.e. Mar, Feb, Jan).
When the application starts, I need to parse that XML file and re-populate the text boxes with those number of days - BUT if the month has moved on, so that the Groupboxes are now called Apr, Mar, Feb then I want the Mar and Feb data to be loaded, and I want the XML file to be updated so that Apr is added and Jan is removed from it.I want the XML file to keep the current and previous two months figures only.
View 1 Replies
Apr 10, 2011
I want to make a program that looks like an address book (name, birth date, phone, e-mail etc) and stores all the persons data in a txt file. If I add a new person, for example, it will be added after the last person that was added in that txt file.
View 2 Replies
Sep 12, 2008
I'm rewriting a legacy application in .NET. In the earlier version, I used a few control .INI files that could be edited by the advanced user to provide variation in certain program options. (The program also permitted override of these same variabes via menus and such.) I used the API functions to read the .INI files and rewrite them to alter the user's environment for subsequent runs.
View 19 Replies
Jun 13, 2011
I'm trying to read data from a text file with multiple records and fields separated by tabs to store into arrays, which I later want to output into a textbox on the form. The problem is that with the code I've written, when I debug it it exits the sub procedure when it enters the first loop where the parser is reading the text file. There are no error messages, it just exits? I'm not even sure if what I've written is possible. Here's what I've written so far:
[Code]...
View 3 Replies
Apr 4, 2012
I created a simple database and I want to learn how can to store my data in it so if I uninstall my application. I can protect the data from deleting then I can use it again when I reinstall the application. The second question is: Can I make a file with special extension for my application so I can save it in my flash drive?
View 7 Replies
Jun 28, 2011
Here is what I would like to do:
- Store string data from a 'sign in' form into a text file. This text file must be one that is saved even after the user exits the program. The text file must also be one that will stay with the program even after it is published (executable).
- Be able to write to/read from the file for purposes of displaying some or all of that data on a form.
I use an Application Setting to do this - of type 'Specialized String Collection'. I tried this, but for some reason I could not get it to work. It was a good idea, but I need to be able to SEE the data that has been saved, and with a setting it seems like that is not easily done. I've decided that I either need to use a simple text file or a 1-table database for this. I would prefer just a text file, but in either case, it needs to be part of the .exe when published.
I have added a text file to my project, but I am not sure if it will be "included" in the project when I publish it. The path of the file I've added is in 'My Documents', but in my code, I will have to specify the path in order to use Streamwriter. How will this affect the program when I publish it? I felt the need to make a new thread because on my last one we had been mainly talking about settings, and I've decided that isn't the best option for me.
View 1 Replies
Jun 13, 2011
I have a bar cash register and have buttons for the drinks and number pad. In the program I have it working and it is reading the File and storing it in a Array. the problem i have is writing back to the part of the textfile. Here is 2 of the drinks buttons, all the rest of the drinks are the same.
[Code]...
View 1 Replies
Feb 8, 2009
I have a simple byte array: Dim TheBuffer() As Byte={0,1,2,3} and I want to store it to a TEXT file. Is there any simple way of doing this? I want to enter the text file and see the array 0,1,2,3. don't want binary format etc.
View 3 Replies
Jul 24, 2010
I'm working on a personal project and so far everything is going perfect. Almost. I have a problem with getting music file info based off of its file path. I.e. "
C:UsersUSERetc." The only things I would need from y'all would be how to get the song's Artist(s) and Name (maybe there's something similar to 'AxWindowsMediaPlayer.currentMedia.getitemInfo("Information")' without actually having to play the song?
After I get this information, I would like to know how to add it to a ListBox as this: "[Artist] - [Song Name]", but I can do the text part if I know the getting-the-information part and adding-the-info-to-listbox part.
View 1 Replies
Jan 26, 2012
The user will basically be able to select a file on their hard drive, and enter some details or info about the file and then save it
View 2 Replies
Feb 10, 2010
I create a string array from a bunch of files that were dropped on a control after that i use a loops to pass that data into an array of my pictureObjects object (just stores filePath info and some other things).for some reason after it's been passed to the control the "My.Computer.FileSystem.RenameFile" doesn't seem to work at all... it's a valid file name and everthing.
Dim sFileArray() As String = e.Data.GetData(DataFormats.FileDrop)
'load sFileArray into new array of picureObjects
ReDim dropedPicture(sFileArray.Length)
Dim dropedOnPictureBox As Integer[code]......
View 1 Replies