Click here to Skip to main content
16,017,167 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Hello Team,

I have one text(.txt)file that contain 'tab delimited' data , i want to read that file and save value in data table.
In .txt File there is one column that contains description which also include space.

Please give solution for above problem.I have to write code in C# (no SSIS)
thanks ,
Yogesh Jumani
Posted

Hello,

Thanks for the solution

I used below link for bulk insert query
Import CSV or txt File Into SQL Server Using Bulk Insert.[^]

with the help of impersonate i copy paste file on server and that i insert record with bulk insert (share above link) and delete file from server

Thanks for solution
 
Share this answer
 
v2
It's a bit more complex that you might think: TAB delimited data can contain quoted strings and so forth.
Have a look at this: A Fast CSV Reader[^] - you can select the seperator character and it will read the file for you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900