Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 2008 > C# 2008 aka C# 3.0
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
C# 2008 aka C# 3.0 Discuss the Visual C# 2008 (aka C# 3.0) language
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2008 aka C# 3.0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 7th, 2009, 08:27 AM
Authorized User
Points: 135, Level: 2
Points: 135, Level: 2 Points: 135, Level: 2 Points: 135, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jul 2007
Location: , , .
Posts: 29
Thanks: 2
Thanked 0 Times in 0 Posts
Default Data table column issue.

I have a CSV file with two columns in it.
Below is some data from the file:
...., ....

This CSV is read into a table like this:
OleDbConnection cn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source= C:\;Extended Properties=""Text;HDR=No;FMT=Delimited""");
                OleDbCommand cmd = new OleDbCommand(sqlSelect, cn);
                OleDbDataAdapter da = new OleDbDataAdapter(cmd);

                dt = new DataTable("TestTable");
                dt.Locale = CultureInfo.InvariantCulture;
This data table is then bound to a datagirdview like this:

BindingSource bsdatabind = new BindingSource();
bsdatabind.DataSource = this.dtperson;
this.dataCenterGridView.DataSource = bsdatabind;
When the data is displayed in the DataGridView it shows only '0' for '0000', '2' for '0002' and completely ignores '000A'.
what do I need to make it display the data as it is in the CSV.

Thanks and Regards.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
update one table column from another table column saracom VS.NET 2002/2003 1 February 28th, 2009 04:46 AM
Identity Column Issue mepancha SQL Server 2000 5 June 17th, 2005 03:00 PM
how to make column of table 1 = to column of table gilgalbiblewheel Classic ASP Databases 4 October 11th, 2004 11:57 PM
dataset column not in data base table gbuller ADO.NET 4 August 18th, 2004 10:18 PM
Compare two Items of data(in column A and column B ever Excel VBA 6 February 13th, 2004 02:19 PM

All times are GMT -4. The time now is 01:19 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.