Click here to Skip to main content
15,887,214 members
Home / Discussions / C#
   

C#

 
GeneralRe: Getting a value from a constructor Pin
PIEBALDconsult19-Mar-10 9:40
mvePIEBALDconsult19-Mar-10 9:40 
GeneralRe: Getting a value from a constructor Pin
av725420-Mar-10 2:12
av725420-Mar-10 2:12 
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 
Hi All,

I have two C# windows application, both are reading .csv file and doing some processing, however there is one difference between both .csv file. One .csv file is using comma (,) as delimiter (separater) and other .csv file is using |(Pipe) character as delimiter (separater), so basically that is customized seperater.
Both .csv file is used by my two different C# windows application.
Now here is a problem.

My first application used .csv file which has comma(,) as seperater and i am using provider as "Microsoft.Jet.OLEDB.4.0" to reading that file with following connectionstring:

string ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + csvfile.Directory.FullName + ";Extended Properties='text;HDR=Yes'";

As by default it's comma, so i don't have to do any changes in my registry to read this file, it's simple but problem came when i am using my other C# windows application.

Second C# windows application is using other .csv file which has |(Pipe) character as seperater(delimiter). To read this type of .csv file i used following connection string

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

As well as in the registry i specified (|) delimiter at following place:
HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Jet \ 4.0 \ Engines \ Text

i defined "Format" = "Delimited(|)" and second C# application able to read .csv file in correct way but now the problem is that it screwed up my first C# application as it is using comma as seperater.

Is there a way to define multiple custom delimiter under registry setting at following place
HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Jet \ 4.0 \ Engines \ Text

like Delimited("|",",") etc or some thing like that??


I tried that but it didn't work.

My questions are :
- how can my both C# application should work without effecting each other?
As i said , one is having comma(,) as sepearter(delimiter) in .csv file and other is having (|) pipe as sepearter, how can my two different application can work at it's own without effecting each other?

- Currently as i defined delimited(|) in above mentioned registry setting so it screwed up first application and my first application is NOT able to read .csv file (which has comma(,) as delimiter)

- Is there a way to define Multiple delimiter in registry settings at above mentioned location at registry?


I don't want to use scheme.ini file at all.

Pls. help me out to resolve this issue.

Thanks in advance.
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 
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 

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.