473,585 Members | 2,496 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

data coming in single column of datagrid

Hi ,
Iam a new uesr of this group.
I have a small doubt . Iam using the code mentioned below to retrive
the data from tab delimited text file ., but Iam getting all the
columns of the text file in one data grid column.

Dim file As String = "test.txt"
Dim path As String = "C:\"
Dim ds As New DataSet("Textfi les")
Try
Dim f As System.IO.File
Dim a = path & file
If f.Exists(path & file) Then
Dim ConStr As String = _
"Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=" & _
path & ";Extended
Properties=""Te xt;HDR=yes;FMT= Delimited;"""
Dim conn As New OleDb.OleDbConn ection(ConStr)
Dim da As New OleDb.OleDbData Adapter("Select * from " &

file, conn)
da.Fill(ds, "test.txt")
End If
Catch ex As Exception
End Try
Can anybody tell me Y Iam getting the .txt data in one column only.
Thanks
Sags

Feb 10 '06 #1
0 1121

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2070
by: dbuchanan | last post by:
VB.NET 2003 / SQLS2K The Stored Procedure returns records within Query Analyzer. But when the Stored Procedure is called by ADO.NET ~ it produced the following error message. --------------------------- Exception Message: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key...
5
1539
by: Dave | last post by:
Hi all, Apologies if this is the wrong group. I have done a search on google but my keywords are probably no good. What I want to do is to display a list of data in a datagrid (which I have already done). At the side of the list, I want to put in a checkbox, basically to select that line.
2
2056
by: localhost | last post by:
When I go into Edit mode on a datagrid, I would like to add a single column to the edited row and display a hyperlink. If I use the code below, I get a delete linkbutton in every row, when I only want it for the row I am editing. It is fine to display the new column for every row, but not a delete button for the rows that are not being...
0
309
by: Alex | last post by:
I have a dataset bound datagrid. I added my own columns (autogenerate=false). However I can't figure out how to display a hyperlink string coming from the DB as a functioning hyperlink. What can I enter into the column "data formatting expression" to make the one column act as a column with hyperlinks.
6
3827
by: Hutty | last post by:
I've looked around and have yet to find anything that would answer my question regarding formating a column in a datagrid. My grid looks like this as far as data" AMHQCON|51300.01|-3147 The first two columns are pretty much text column, but subsequent columns 1-12 are numerical. I'm trying to get the thousand separator to work. Any...
5
1726
by: Bruce D | last post by:
Is there a way to programatically set the format of just one column in a datagrid? I have a datagrid bined to a datasource. My dataview has 6 columns. And I want to format one column ('amount')...without have to mess with all the other columns. If I use DataGridTableStyle() and DataGridTextBoxColumn() (see following code)...my datagrid...
11
6660
by: Kay | last post by:
Hi all, I have populated a dataset with several tables, say - Roster, Agent and few more . The dataset is used to populated a listview with some shift info.. I think I'm sucessfully created a relationship in the dataset. In the Roster table there's an "AgentKey" which can be linked to the Agent table. What I'm tryting to do is, while...
1
4603
by: yumbelie | last post by:
Hi, I want to set multiple datafields from a dataset to a single boundcolumn in my gridview, but I can't see any easy way to do this since the DataField property of the boundcolumn takes a single string that maps 1-to-1 to the relevant column in the dataset. I want to map three columns from my dataset to a single column in my DataGrid - is there...
6
2933
by: insirawali | last post by:
Hi all, I have this problem, i need to know is there a way i cn use the data adapter's update method in this scenario. i have 3 tables as below create table table1{ id1 int identity(1,1) Constraint pk_table1 Primary Key,
0
7908
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8199
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8336
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7950
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5389
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3835
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3863
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2343
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1447
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.