Click here to Skip to main content
15,913,215 members
Home / Discussions / C#
   

C#

 
AnswerRe: Getting a value from a constructor Pin
PIEBALDconsult20-Mar-10 3:29
mvePIEBALDconsult20-Mar-10 3:29 
Questionfrom C++ dll to microsoft C# in .NET Pin
pedefetoll19-Mar-10 4:40
pedefetoll19-Mar-10 4:40 
AnswerRe: from C++ dll to microsoft C# in .NET Pin
Wes Aday19-Mar-10 4:45
professionalWes Aday19-Mar-10 4:45 
GeneralRe: from C++ dll to microsoft C# in .NET Pin
pedefetoll19-Mar-10 4:50
pedefetoll19-Mar-10 4:50 
GeneralRe: from C++ dll to microsoft C# in .NET Pin
Wes Aday19-Mar-10 4:55
professionalWes Aday19-Mar-10 4:55 
Questionproblem in reading .csv files Pin
montu337719-Mar-10 4:19
montu337719-Mar-10 4:19 
AnswerRe: problem in reading .csv files Pin
Wes Aday19-Mar-10 4:41
professionalWes Aday19-Mar-10 4:41 
GeneralRe: problem in reading .csv files Pin
montu337719-Mar-10 4:59
montu337719-Mar-10 4:59 
Hi,

Can you tell me what are easier ways? I am using following code :

//Taking connection using to .csv file

string textConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\"" + StrInputCSVFile + "\";Extended Properties='text;HDR=No;FMT=Delimited';";

//assigning to oledbconnection string
OleDbConnection conn = new OleDbConnection(textConnectionString);

// Opening connection
conn.Open();

//selecting rows from .csv file
sql_select = "Select * from " + InputCSVFile.ToString().Trim() ;

//Creates the data adapter
OleDbDataAdapter obj_oledb_da = new OleDbDataAdapter(sql_select, conn);
//Fills dataset with the records from CSV file
obj_oledb_da.Fill(ds);

As i have (|) pipe character in my .csv file , so i am specifying (|) pipe sepearter in registry setting otherwise i will NOT get correct parsed values.

Pls. let me know if you have some other way rather than this way??

I am eager to seeing that.

Thanks a lot for reply.
GeneralRe: problem in reading .csv files Pin
Wes Aday19-Mar-10 5:13
professionalWes Aday19-Mar-10 5:13 
AnswerThe easiest solution Pin
Ennis Ray Lynch, Jr.19-Mar-10 5:14
Ennis Ray Lynch, Jr.19-Mar-10 5:14 
AnswerRe: problem in reading .csv files Pin
PIEBALDconsult19-Mar-10 6:22
mvePIEBALDconsult19-Mar-10 6:22 
GeneralRe: problem in reading .csv files Pin
Matt Meyer19-Mar-10 7:04
Matt Meyer19-Mar-10 7:04 
AnswerRe: problem in reading .csv files Pin
Rod Kemp19-Mar-10 20:24
Rod Kemp19-Mar-10 20:24 
QuestionHow to work by reference object in remoting Pin
amit_8319-Mar-10 2:24
professionalamit_8319-Mar-10 2:24 
AnswerRe: How to work by reference object in remoting Pin
Pete O'Hanlon19-Mar-10 3:00
mvePete O'Hanlon19-Mar-10 3:00 
QuestionFilling a cylinder Pin
Valeriant19-Mar-10 2:04
Valeriant19-Mar-10 2:04 
AnswerRe: Filling a cylinder Pin
Eddy Vluggen19-Mar-10 8:38
professionalEddy Vluggen19-Mar-10 8:38 
GeneralRe: Filling a cylinder Pin
Valeriant19-Mar-10 17:01
Valeriant19-Mar-10 17:01 
GeneralRe: Filling a cylinder Pin
Dave Kreskowiak19-Mar-10 18:25
mveDave Kreskowiak19-Mar-10 18:25 
GeneralRe: Filling a cylinder Pin
Eddy Vluggen20-Mar-10 1:00
professionalEddy Vluggen20-Mar-10 1:00 
GeneralRe: Filling a cylinder Pin
Valeriant20-Mar-10 2:27
Valeriant20-Mar-10 2:27 
GeneralRe: Filling a cylinder Pin
Eddy Vluggen20-Mar-10 3:58
professionalEddy Vluggen20-Mar-10 3:58 
GeneralRe: Filling a cylinder Pin
Valeriant21-Mar-10 5:00
Valeriant21-Mar-10 5:00 
QuestionHow do I 'drive' a command line utility beyond executing a single process / command? Pin
Mouldiwarp19-Mar-10 1:28
Mouldiwarp19-Mar-10 1:28 
AnswerRe: How do I 'drive' a command line utility beyond executing a single process / command? Pin
Calla19-Mar-10 1:52
Calla19-Mar-10 1:52 

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.