Hi,
Can you give me a sample in asp.net c#, to see how can I read text file with data 1 symbol char(1) - eg: 0,1,0,0,1,0; 0,0,1,0,0,0;
etc and write into a database.
create table equipment(
id int not null auto_increment,
alarm char(1) not null,
warning char(1) not null,
normal char(1) not null,
open_door char(1) not null,
fire char(1) not null,
power_on char(1) not null);
This is for 5 tables. But to be able to read the data at the same time, so I need to avoid read/write conflicts.
Thanks and regards,
Trifon.
Read text file and write in a database
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Subramanyam RompicherlaRank #4,887 · 320 reputationPosted Jun 24, 2009, 10:01 AM EDT
i did't understand your full requirements, but below link will helps to you read and write a text file
http://bytes.com/topic/net/insights/673819-write-read-text-file-c
Trifon Dinev24 reputationPosted Jun 25, 2009, 4:01 AM EDT
I know how to read from and write in a text file, but later on I want to write this data into a MySQL table.
how can I read text file with data 1 symbol char(1) - eg:
Content of the text file:
0,1,0,0,1,0;
0,0,1,0,0,0;
etc
and write into a MySQL database.
create table equipment(
id int not null auto_increment,
alarm char(1) not null,
warning char(1) not null,
normal char(1) not null,
open_door char(1) not null,
fire char(1) not null,
power_on char(1) not null);
This is for 5 tables. But to be able to read the data at the same time, so I need to avoid read/write conflicts.
Thanks and regards,
Trifon.