TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
saphiroth42
NA
53
0
opening and reading .csv files
Feb 4 2005 2:00 PM
Hi, I need help opening and reading a csv file. The csv files im dealing with are in an excel format...in fact they info is in excel but the extension is .csv. The first line in this csv..excell file is the heading which says Pressure then line 2 through line 5 there are pressure numbers. I wish to read this data into text boxes. Ive tried putting this data into a data column using odbc but im having trouble with it. Here is the code: strConnectString = "Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=Gauge.CSV" dbConn = New Odbc.OdbcConnection(strConnectString) strSQL = "SELECT [Pressure] AS Pressure FROM Gauge.CSV" da = New System.Data.Odbc.OdbcDataAdapter(strSQL, dbConn) dt = New DataTable dc = New System.Data.DataColumn dc.ColumnName = "Pressure" dc.DataType = System.Type.GetType("System.String") dt.Columns.Add(dc) da.Fill(dt) dbConn.Close() While (RowPosition <> (dt.Rows.Count)) 'while current row position <> total row count Press = (dt.Rows(RowPosition)("Pressure")).ToString() 'Gets Pressure End While thank you
Reply
Answers (
1
)
Remoting: getting connected clients
How do I make MenuItems now show arrow image if it has submenu.