# Write quotes to a file.

**URL:** <https://www.dynamicsuser.net/t/write-quotes-to-a-file/9561>\
**Category:** Developers Forum\
**Created:** [January 11, 2005, 3:38pm UTC](https://www.dynamicsuser.net/t/write-quotes-to-a-file/9561 "2005-01-11T15:38:54Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmauldin](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@dmauldin](https://www.dynamicsuser.net/u/dmauldin)\
**Post date:** [January 11, 2005, 3:38pm UTC](https://www.dynamicsuser.net/t/write-quotes-to-a-file/9561/1 "2005-01-11T15:38:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![DjangMan](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@DjangMan](https://www.dynamicsuser.net/u/DjangMan)\
**Post date:** [January 11, 2005, 5:19pm UTC](https://www.dynamicsuser.net/t/write-quotes-to-a-file/9561/2 "2005-01-11T17:19:21Z")

</div>

What have you tried? Django

---

<div class="post-metadata">

**Author:** ![anfinnur](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@anfinnur](https://www.dynamicsuser.net/u/anfinnur)\
**Post date:** [January 12, 2005, 3:42pm UTC](https://www.dynamicsuser.net/t/write-quotes-to-a-file/9561/3 "2005-01-12T15:42:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dmauldin](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@dmauldin](https://www.dynamicsuser.net/u/dmauldin)\
**Post date:** [January 12, 2005, 9:02pm UTC](https://www.dynamicsuser.net/t/write-quotes-to-a-file/9561/4 "2005-01-12T21:02:22Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dehibler](https://avatars.discourse-cdn.com/v4/letter/d/d78d45/32.png) [@dehibler](https://www.dynamicsuser.net/u/dehibler)\
**Post date:** [January 12, 2005, 9:09pm UTC](https://www.dynamicsuser.net/t/write-quotes-to-a-file/9561/5 "2005-01-12T21:09:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dmauldin](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@dmauldin](https://www.dynamicsuser.net/u/dmauldin)\
**Post date:** [January 13, 2005, 1:19pm UTC](https://www.dynamicsuser.net/t/write-quotes-to-a-file/9561/6 "2005-01-13T13:19:57Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![dehibler](https://avatars.discourse-cdn.com/v4/letter/d/d78d45/32.png) [@dehibler](https://www.dynamicsuser.net/u/dehibler)\
**Post date:** [January 13, 2005, 1:33pm UTC](https://www.dynamicsuser.net/t/write-quotes-to-a-file/9561/7 "2005-01-13T13:33:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![stryk](https://avatars.discourse-cdn.com/v4/letter/s/ee59a6/32.png) [@stryk](https://www.dynamicsuser.net/u/stryk)\
**Post date:** [January 13, 2005, 2:06pm UTC](https://www.dynamicsuser.net/t/write-quotes-to-a-file/9561/8 "2005-01-13T14:06:39Z")

</div>

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,

---

<div class="post-metadata">

**Author:** ![Nelson](https://avatars.discourse-cdn.com/v4/letter/n/dec6dc/32.png) [@Nelson](https://www.dynamicsuser.net/u/Nelson)\
**Post date:** [January 13, 2005, 5:00pm UTC](https://www.dynamicsuser.net/t/write-quotes-to-a-file/9561/9 "2005-01-13T17:00:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dmauldin](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@dmauldin](https://www.dynamicsuser.net/u/dmauldin)\
**Post date:** [January 14, 2005, 6:13pm UTC](https://www.dynamicsuser.net/t/write-quotes-to-a-file/9561/10 "2005-01-14T18:13:29Z")

</div>

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].
