Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



need some VB.net help

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 13-03-2009
Member
 
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
}

\\\

Reply With Quote
  #2  
Old 13-03-2009
Member
 
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.
Reply With Quote
  #3  
Old 13-03-2009
Member
 
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..
Reply With Quote
  #4  
Old 13-03-2009
Member
 
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...
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags:



Thread Tools Search this Thread
Search this Thread:

Advanced Search



All times are GMT +5.5. The time now is 02:38 PM.