c# - Save formatted plain text into SQL Server? -
i have text file following content
hdcnwupc 2014110616414617001509cn dt01u00008 ak ctn head lettuce
i need save sql table nvarchar column. distorted content when retreive values.
hdcnwupc 2014110616414617001509cn dt01u00008 ak ctn head lettuce
this not html content, plain text text file, spacing have significance. need implement in c#. following code reads content text file.
var k = system.io.file.readalltext(@location);
what might suitable way ?
try (add encoding parameter)
var k = system.io.file.readalltext(@location,, encoding.ascii);
refer here documentation
Comments
Post a Comment