Guest User

Guest User

  • Tech Writer
  • 112
  • 5.4k

C#.net .How to read data from txt file and store into sqlser

Feb 21 2013 7:35 AM
Hi Friends,

C#.net Windows Applications:
i have text file like this.
Hello.txt
-----1------
Name =siddheshwar       Age =23
occ =enggineer      ms =NO
-----2------
Name =robert       Age =26
occ =doctor        ms =NO
-----3------
Name =mahesh   Age =25  

occ =teacher      ms =NO

here i need to get the values and store into database .
sqltable is like this
 

id      Name          Age       OCC            ms
1      siddheshwar  23         teacher       NO
2      robert          26         doctor         NO
3      mahesh        25         teacher       NO

how to do this if u have any idea send me code.

Thanks n Advance.

Siddheshwar



Answers (1)