Results 1 to 5 of 5

Thread: VB.net question

  1. #1
    Join Date
    Feb 2009
    Posts
    96

    VB.net question

    i have to create a structure out of a supplied not pad file
    the note pad file is something like

    name
    address
    zip
    and a rich text box section

    using the above information how can i access the fields that are in that form with out a visible delimiter and each field is on its own line as well as how do i access the richtextbox info at the same time ?
    there is one delimiter between records which is /// not between the fields themselves. How do i use that as well.

    sorry about the noob question but our book sucks and the prof is not very knowledgable about vb.net since he was thrown in as a stop gap.

    thanx

  2. #2
    Join Date
    Apr 2008
    Posts
    2,005

    Re: VB.net question

    Why don't you use MS-Access instead of notepad... Using Access is much similar, and you will have to create a DNS from ADmin tools to connect access to VB.NET... Google around for some time to find out how... Is quite easy...!
    All the best!

  3. #3
    Join Date
    Apr 2008
    Posts
    1,948

    Re: VB.net question

    Code for Creating a Structure

    Structure Employee
    'declaring a structure named Employee
    Dim EmpName As String
    Dim EmpDesignation As String
    Dim EmpCity As String
    Dim EmpSal As Double
    Dim EmpId As Integer
    'declaring five fields of different data types in the structure
    End Structure

    Sub Main()
    Dim san As New Employee()
    'creating an instance of Employee
    san.EmpName = "Sandeep"
    san.EmpDesignation = "Software Developer"
    san.EmpCity = "Sydney"
    san.EmpSal = 60000
    san.EmpId = 2707
    'assigning values to member variables
    WriteLine("EmpName" + " " + san.EmpName)
    WriteLine("EmpDesignation" + " " + san.EmpDesignation)
    WriteLine("EmpCity" + " " + san.EmpCity)
    WriteLine("EmpSalary" + " " + san.EmpSal.ToString)
    WriteLine("EmpID" + " " + san.EmpId.ToString)
    'accessing member variables with the period/dot operator
    Read()
    End Sub

    End Module

  4. #4
    Join Date
    Feb 2009
    Posts
    96

    Re: VB.net question

    the data is preset i was given a txt file with the data on it... I cant change the data on the file. I need to know how to seperate the fields that im given if the delimeter is a hard return? I cant find info on that anywhere.

  5. #5
    Join Date
    Feb 2008
    Posts
    194

    Re: VB.net question

    As per my knowledge, you need to call the file, load it in your form and set the fields to get the data from your concerned file; and finally use it as per your requirement.

    Note: Remember that you need to close that file when you are done.

Similar Threads

  1. Replies: 8
    Last Post: 27-01-2012, 01:14 PM
  2. PCI-E 2.0 Question
    By fochdion in forum Monitor & Video Cards
    Replies: 1
    Last Post: 26-08-2010, 08:59 PM
  3. .pst question
    By bac15 in forum Windows Software
    Replies: 2
    Last Post: 03-03-2009, 07:09 PM
  4. USB 3 Question
    By bigboy in forum Hardware Peripherals
    Replies: 3
    Last Post: 16-12-2008, 08:05 PM
  5. Question with AGP 8x
    By Maximus() in forum Monitor & Video Cards
    Replies: 4
    Last Post: 06-10-2008, 06:12 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,718,858.77266 seconds with 17 queries