i am trying to read a 2 way delimited txt file into sqlserver in VS2008 using C# and SQL server2005. the individual entries of the file are delimited by "~" and the data within the entries are separated using "$". and i need to read the entries as rows in the database and the data within each entry i.e. delimited by $ as columns or fields in the database.
since i am new to .net, i am not able to do the 2 way delimiting and read all the rows into the database.
here is a pattern of the data we are dealing with...
*************** *************** *************** ***********
12:02:16 AM$206.79.184.1 23$eejyaqmgcm0c dj45apdeeu55$Av ailability$Gene ral network error.~
12:02 AM$170.35.208.2 2$bo1lbm455s1di 245asulqrjc$onl ine_booking.asp x$Object reference not set to an instance of an object.~
*************** *************** *************** ***********
as u can see, ~ separates two different entries...i.e to be entered as rows in the database. and $ separates the data within each entry...i.e the columns inside each row in the database.
i would be very thankful if u could help me in this matter as soon as possible.
since i am new to .net, i am not able to do the 2 way delimiting and read all the rows into the database.
here is a pattern of the data we are dealing with...
*************** *************** *************** ***********
12:02:16 AM$206.79.184.1 23$eejyaqmgcm0c dj45apdeeu55$Av ailability$Gene ral network error.~
12:02 AM$170.35.208.2 2$bo1lbm455s1di 245asulqrjc$onl ine_booking.asp x$Object reference not set to an instance of an object.~
*************** *************** *************** ***********
as u can see, ~ separates two different entries...i.e to be entered as rows in the database. and $ separates the data within each entry...i.e the columns inside each row in the database.
i would be very thankful if u could help me in this matter as soon as possible.
Comment