Click here to Skip to main content
15,890,438 members
Home / Discussions / C#
   

C#

 
AnswerRe: Closing a Webform by clicking the close button Pin
enjoycrack6-Dec-05 9:15
enjoycrack6-Dec-05 9:15 
AnswerRe: Closing a Webform by clicking the close button Pin
Dave Kreskowiak6-Dec-05 10:24
mveDave Kreskowiak6-Dec-05 10:24 
QuestionHow to launch multiple threads Pin
Oskar Emil6-Dec-05 7:27
Oskar Emil6-Dec-05 7:27 
AnswerRe: How to launch multiple threads Pin
mcljava6-Dec-05 11:43
mcljava6-Dec-05 11:43 
GeneralRe: How to launch multiple threads Pin
Oskar Emil7-Dec-05 7:16
Oskar Emil7-Dec-05 7:16 
QuestionHow to get all properties of system_comobject(like word 2003) using reflection ? Pin
caiter6-Dec-05 5:58
caiter6-Dec-05 5:58 
QuestionBinding a ds to a textbox control Pin
steve_rm6-Dec-05 5:55
steve_rm6-Dec-05 5:55 
Questiononly get one field when import csv to datagrid Pin
tabulation6-Dec-05 5:41
tabulation6-Dec-05 5:41 
I'm trying to import a csv text file into a datagrid. when i get it done, only the first field in the text file appears. i'm not sure why. am i only getting one field into the data set? or are all the fields getting into the data set and i'm only transfering one field to the data grid?

here's my code:

string strConnection = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\DataFiles;Extended Properties=""text;HDR=Yes;FMT=TabDelimited""";

OleDbConnection conn = new OleDbConnection(strConnection);

string selectString = "Select * From [sellerEngine_1.txt]";

OleDbCommand cmd = conn.CreateCommand();

cmd.CommandText = selectString;

OleDbDataAdapter da = new OleDbDataAdapter();

da.SelectCommand = cmd;

DataSet ds = new DataSet();

conn.Open();

string dataTableName = "SellerEngine";

da.Fill(ds, dataTableName);

DataTable dt = ds.Tables[dataTableName];

dataGrid1.DataSource = dt.DefaultView;

conn.Close();

thanks!

Thomas Barker
QuestionInteger formatting in C# appending "st", "nd", rd" or "th" to an int. Pin
tsramkumar6-Dec-05 5:08
tsramkumar6-Dec-05 5:08 
AnswerRe: Integer formatting in C# appending "st", "nd", rd" or "th" to an int. Pin
J4amieC6-Dec-05 5:47
J4amieC6-Dec-05 5:47 
QuestionStatusbar Icon - Display Issue Pin
mcljava6-Dec-05 4:03
mcljava6-Dec-05 4:03 
AnswerRe: Statusbar Icon - Display Issue Pin
Pablo Hernandez Valdes6-Dec-05 8:31
Pablo Hernandez Valdes6-Dec-05 8:31 
Questionusing regex to find part of a string Pin
melanieab6-Dec-05 3:52
melanieab6-Dec-05 3:52 
AnswerRe: using regex to find part of a string Pin
S. Senthil Kumar6-Dec-05 4:37
S. Senthil Kumar6-Dec-05 4:37 
GeneralRe: using regex to find part of a string Pin
melanieab6-Dec-05 5:09
melanieab6-Dec-05 5:09 
GeneralRe: using regex to find part of a string Pin
S. Senthil Kumar6-Dec-05 5:16
S. Senthil Kumar6-Dec-05 5:16 
GeneralRe: using regex to find part of a string Pin
melanieab6-Dec-05 5:47
melanieab6-Dec-05 5:47 
GeneralRe: using regex to find part of a string Pin
S. Senthil Kumar6-Dec-05 6:00
S. Senthil Kumar6-Dec-05 6:00 
GeneralRe: using regex to find part of a string Pin
melanieab6-Dec-05 7:39
melanieab6-Dec-05 7:39 
GeneralRe: using regex to find part of a string Pin
S. Senthil Kumar6-Dec-05 20:36
S. Senthil Kumar6-Dec-05 20:36 
QuestionCustom Controls And Events Pin
rich_wenger6-Dec-05 3:48
rich_wenger6-Dec-05 3:48 
QuestionAutoRedraw Pin
Sabry19056-Dec-05 2:47
Sabry19056-Dec-05 2:47 
Question.NET Remoting and recorded sound? Pin
mikker_1236-Dec-05 1:27
mikker_1236-Dec-05 1:27 
Questiondll Pin
ambedkar6-Dec-05 1:26
ambedkar6-Dec-05 1:26 
AnswerRe: dll Pin
Colin Angus Mackay6-Dec-05 1:51
Colin Angus Mackay6-Dec-05 1:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.