Question Error when reading from text file, creating errors in SQL statement


New member
Oct 15, 2008
Programming Experience
I'm working on writing a console app that reads a text file line by line and inserts the data into an Access database. I ran into a few snags that I was able to take care of, such as single quotes making it into the SQL statement, etc. (Now mind you, I'm still quite a novice at this).

The problem that I can't seem to get past is there is a few lines in the text file that contain this non-printable character. This character, when the text file is opened in a Hex editor, shows 00. From what I've read this is something like an end of string or eof or something.

I suppose my question is this, is there a way that I can take the string that holds this line read and convert it to Hex, then possibly remove the 00 and convert back? Or is there an easier way or possibly something that I'm overlooking?
Top Bottom