Wrox Programmer Forums
|
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 9th, 2004, 01:16 PM
Authorized User
 
Join Date: Feb 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to JAtkinson
Default Data Save Suggestions....

Hello everyone. I just started coding a few weeks ago with VB.NET. This is my first attempt at learning a programing language (dabbled with eMbedded VB 3.0 for PPC). I'm currently trying to write my first practical program. I bought the "Beginning VB.Net" book and it's been wonderful. I do have a question about my current project. Im making a sort of database for NFL Football players and their team and other information about them.

Project Outline: (Football Player Info) Form1 [Design]

-Scroll through ComboBox for Team
-Enter Player Name in textbox
-Enter Height in combobox
-Other info in RichTextBox
and so on...

My question is:
I know how to save the RichTextBox text using streamwriter.How can I also save the information in the comboboxes and textboxes so when I open the application again, the information will be placed back into the textboxes and comboboxes. That way, in case some of their information changes, I can edit the player and re-save? Ive tried saving the combobox text also using the streamwriter, but when I open the file again, it puts the the combobox text in the RichTextBox and not into the combobox. I know this may sound confusing, but Im really new at programming. Any suggestions as to what I should do? XML?

Thanks,
James Atkinson
 
Old February 9th, 2004, 04:16 PM
Authorized User
 
Join Date: Feb 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to JAtkinson
Default

OK, Ive tried working it into XML format. I just have one small problem. Instead of saving the file to Environment.CurrentDirectory, I would like to save it to a file path selected in a combobox.

Code:
Public ReadOnly Property DataFilename() As String
        Get


            '  get our working folder...
            Dim folder As String
            folder = "c:\" & cmbNewTeam.Text "\" & cmbNewPosition.Text "\"


            '  return the folder with the name "Player Profile.xml"...
            Return folder & "\Player Profile.xml"
        End Get
    End Property


If you take a look at the folder =, you can see what Im trying to do. I just need to correct format for doing this.







Similar Threads
Thread Thread Starter Forum Replies Last Post
Save data from within a DataGrid edurazee ADO.NET 0 July 28th, 2008 09:15 AM
Save User Data Whitney Schopf Visual Basic 2005 Basics 2 December 27th, 2006 10:18 AM
Save data on datagridview salemkoten SQL Server 2005 1 November 2nd, 2006 11:04 PM
How to Save data through MACRO kotaiah Excel VBA 1 September 21st, 2006 07:23 AM
not able to save data using javascript rok Classic ASP Databases 0 April 21st, 2004 04:31 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.