Click here to Skip to main content
14,739,804 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Sir,
I have text file which having data like as:



             <ItemDesc>Fresh food<END-ItemDesc>


I already read data in string variable and now I want to stored it in database ,How to do it please suggest me.

Thank you in advance.
phil.o 20-Sep-13 2:42am
Just a question: why not using the XML format as your source file? It would make your import task much easier.
If you are not responsible for this nonsense source format, you are allowed to rant violently against the one who is :)
Bhanu Pratap Verma 27-Jun-14 7:42am
Dear the format sent by client and they have only format like that. because they are using same format in multiple projects so we can not violent against him.

What you want to store? entire text file? or individual fields in database. please elaborate with proper explanation.

If you need to store individual field then its very simple.

Bhanu Pratap Verma 27-Jun-14 7:43am
Dear You very much for your reply. I solved it.
I want to store data which inside the tags In the tables .

The Tables structure as

Table1 : BEMAST(BENo,BEDate)
Table2 : BEIGM(IGNNo,BEDate)
Table3 : BECONT(BE)
Table4 : BEITEM(HSCODE,ItemDesc)
Sergey Alexandrovich Kryukov 26-Jun-14 13:50pm
Please stop posting fake "answers". This is the abuse.

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