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
boycoto
NA
147
125.5k
Lack of one record in reading data file using OleDB.
Aug 4 2012 9:14 AM
Hi guys, I am a bit curious why does the dataset contains only 9 rows wherein there were 10 records in a data file.
I used the following codes to retrieve data from a file...
[QUOTE]
OleDbDataAdapter oleData;
DataSet dsData = new DataSet();
string strOleConnection = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + Path.GetDirectoryName(strFile) +
";Extended Properties='text;HDR=Yes;FMT=Delimited(,)'";
string strRetrieveData = "SELECT * FROM " + Path.GetFileName(strFile);
oleCSVData = new OleDbDataAdapter(strRetrieveData, strOleConnection);
oleCSVData.Fill(dsData);
[/QUOTE]
However, if I am going to retrieve data from the file using StreamReader, I can able to retrieve all records.
Another thing, which is faster in retrieving records on a data file, is it using StreamReader or OleDB.
I need your help and guidance.
Reply
Answers (
2
)
binary to doc conversion
Checking for datagridview cell entry and focussing control on the same cell if the entry is invalid