|
|
![]() |
| Thread Tools | Search this Thread |
#1
| |||
| |||
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
| |||
| |||
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
| |||
| |||
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
| |||
| |||
Re: need some VB.net help
actually what you see above is the exact file i need to import... |