As one commenter correctly guessed, it was corruption in the SQL text but I think it occurred in Outlook not Excel. For some as yet undiscovered reason, some of the spaces in the SQL string had their top bit set. This wasn't spotted by any of the tools until the SQL was run
and I had to use Textpad a file viewer to see the string once it was saved out. The space characters had the value 0xa0 (160 in decimal) and the quick and dirty way to fix this was to backspace each space and type in a real space! As a developer you have to cope with such trials and tribulations but even that was a new one on me!
As a better solution I wrote a small file utility to read a file in, clear all the top bits and then save the file out and this will be in the next C tutorial which I'll be starting this week on file access in C. The current C# tutorial on strings should appear tomorrow. Now I'm going to play with my new Linux PC which arrived today. More on that tomorrow.
Comments
No comments yet. Leave a Comment