Results 1 to 4 of 4

Thread: need some VB.net help

  1. #1
    Join Date
    Feb 2009
    Posts
    96

    need some VB.net help

    i need to use the info at the bottom that is in a text file and separate it into fields to be shown on a form. each line is a field and the {} line is in rich text format. I am totally lost on how i can make vb read this file put each field into its corisponding text box on the main form and make the rich text part go into a rich text box on the form. The form is set up like this
    txtFirstName
    txtLastName
    txtCity
    txtState
    etc..

    then i have a rich text box for the rich text box information.

    I need to have the fields from the records below separated and put in the above text boxes and rich text box.
    any idea of I would do that would be great.

    thanx for your time


    Mary
    Deems
    123 Oak Street
    Reno
    NV
    89522-2222
    2/1/2002 12:00:00 AM
    {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}}
    \viewkind4\uc1\pard\f0\fs17 First Time Contacted\par
    }
    \\\
    Jim
    Smith
    123 Vine Street
    Incline Village
    NV
    89222-3345
    2/22/2002 12:00:00 AM
    {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}}
    \viewkind4\uc1\pard\b\f0\fs17 Jim\b0 is one of our best customers.\par
    }

    \\\

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

    Re: need some VB.net help

    Hi First you should fill the Values from database to datatable. like.

    dim Ds as new Dataset

    dim Cmd as new sqlcommand("Exec " ,con)

    dim ada as new sqldataadapter(cmd)

    ada.Fill(Dataset,"DataTableName")

    Now you have to decalre the Datatable Like

    Dim Dt as data.DataTable=Ds.DatatableName

    Dim Dr() as data.DataRow=Dt.Select();

    For i = 0 to Dr.Length-1

    lbl.Text=Dr(i).Item("FieldName")

    Next

    By using the above code, we can retrive the all values from DataTable.

  3. #3
    Join Date
    Dec 2008
    Posts
    202

    Re: need some VB.net help

    Hi Daren,

    Which File format you are using to import the data from Text file to VB.Net, there are Comma-separated i.e .CSV file format (,) and Hash-separated i.e (#) file format are available through which we can import data into VB.Net form, so please mention which file format your data is..

  4. #4
    Join Date
    Feb 2009
    Posts
    96

    Re: need some VB.net help

    actually what you see above is the exact file i need to import...

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,713,266,674.67561 seconds with 15 queries