Write quotes to a file.

I need to know how to write the code to write a " to a field in the code.

What have you tried? Django

Did you try to change the field-delimiters to something else than quote-mark? You find it in the dataport’s properties.

I haven’t written the typical dataport. I am acutally writing to the file with the write command. I know in other languages if there is a character used such as the quote is in Navision, then you can put another charcter in front to tell the compiler you are putting the quote in the field. For example gtempfield := “/”";. The / would tell the complier that I am putting the " in gtempfield. Thanks.

David, If you create a variable of type Char, you can assign it the ASCII value of the letter or symbol you want to use. In this case, you could assign it the ASCII value of quotes and then write the variable to your field. One instance I used this in was in creating a text output file for a report. I assigned the variable a value of 13 to represent a carriage return. EOLN := 13; In the WRITE command, I issued a FORMAT(EOLN) to write the carriage return to my file.

Thanks. I thought I might have to do something like that. I have used the carriage return and Line Feed ASCII chars is this dataport and some others. Do you happen to know the ASCII char for a quote?

The ASCII code for quotes is 34. You can find all the characters at http://www.asciitable.com/

How can you have a problem with writing " (ASCII 34) to file? … myFile.WRITE(’"’); … This should work! The problem occurs with writing this quote ’ (ASCII 39), you can not do this … myFile.WRITE(’’’); … You’ll have do this: … QuoteChar := 39; // Variable, Type: Char myFile.WRITE(FORMAT(QuoteChar)); … Regards,

You can also do myFile.WRITE(’"’); = ’ ’ ’ ’ (4 quotes) 2 quotes will write 1 quote to the file.

Thanks for the Ascii table web site. That will probably come in handy. I guess I just had a brain fart about writing as ‘"’. I guess I was thinking " was used to write a string to a file. [Duh!] [:o].