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