Hi,
I am doing a retrieve on a datastore and then exporting the datastore into a string and writing to text file. When I open the text file I get these weird Red Nul Characters.
When I print to console, it prints as " ".
When I check string.Contains(" "); it doesn't contain it.
When I check string.Contains("); it does contain it.
So its weird it prints to console as " " and not as "" and whats even weirder in the txt the same string prints as a red Nul
I know I can loop through each row ( i have 200,000 rows) and remove the "" string by doing dataStore[i].ColumnName1, datstore[i].columName2 ... datastore[i].columnName75. My goal is to avoid writing down all 75 datastore properties and checking if any of them contain that character and keep the same formatting in my text file. In other words instead of the red Nul just print as "" in my .txt file and keep everything else as is.
If anyone could please help me with this I would really appreciate it.
Thanks,
Saul
edit: When I do this same retrieve in PB 2022 my file isn't filled with Red Nuls.
Although I know PB reasonably well, I'm unable to advise you, since I can barely spell dot-net. Please realize that since this is a PowerBuilder forum and since many of us here do not have extensive experience with C# coding, there's likely going to be some difficulty understanding each other since our respective frames of reference are so different from each other.
Roland's question is important, as that will help others (not me, unfortunately) figure out the format (and encoding) of the data you are wanting to write to a file. It will probably also be helpful to know more details about how you are writing the data to a file.