Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / ADO.NET / May 2005

Tip: Looking for answers? Try searching our database.

dataset from tab separated

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
news.microsoft.com - 23 May 2005 12:40 GMT
Hello

I want to create a asp.net / winform application, which has a text box.

In the text box, the user will paste data (copied from another source), in
tab separated format.

Supposedly, all the columns are always in a predetermined order, how can I
put this into a dataset and bind to it ..

Any input would be appreciated.

Thanks

Hemang
Val Mazur \(MVP\) - 24 May 2005 01:58 GMT
Hi,

What you need to do is to create empty DataTable first that will have
required structure. Then you read the string and use Split method of String.
It allows to split delimited data into array. Now you need to add new row to
the dataTable and populate it from array

Signature

Val Mazur
Microsoft MVP

http://xport.mvps.org

> Hello
>
[quoted text clipped - 11 lines]
>
> Hemang
news.microsoft.com - 24 May 2005 04:47 GMT
Boy sounds intimidating.

The empty dataTable should I create it in visual dataset ?

Is there any sample code for "splitting delimited data into array" and then
into datatable?

Thanks

> Hi,
>
[quoted text clipped - 18 lines]
>>
>> Hemang
Val Mazur \(MVP\) - 25 May 2005 01:29 GMT
Hi,

No, you do not have to create datatable visually, you could do it on a fly.
To split string into array just next kind of code

dim loValues() as string

loValues=mystring.Split(" ") 'assuming that delimiter is a space character

Signature

Val Mazur
Microsoft MVP

http://xport.mvps.org

> Boy sounds intimidating.
>
[quoted text clipped - 27 lines]
>>>
>>> Hemang
news.microsoft.com - 25 May 2005 11:47 GMT
It is a Tab delimted file

How do I Split on Tab?
> Hi,
>
[quoted text clipped - 36 lines]
>>>>
>>>> Hemang

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.