# SQLite and EndOfLine on MultiPlatform App ?

**URL:** <https://forum.xojo.com/t/sqlite-and-endofline-on-multiplatform-app/47126>\
**Category:** Databases\
**Created:** [January 25, 2019, 2:04pm UTC](https://forum.xojo.com/t/sqlite-and-endofline-on-multiplatform-app/47126 "2019-01-25T14:04:50Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [January 25, 2019, 2:04pm UTC](https://forum.xojo.com/t/sqlite-and-endofline-on-multiplatform-app/47126/1 "2019-01-25T14:04:50Z")

</div>

`Check_Str = SQLite_RS.Field("PNom")
If InstrB(Check_Str, EndOfLine) <> 0 Then`

The code above does not works on Windows while it works fine on macOS (El Capitan and another lower version).

Explanation:  
I noticed that sometimes, there are more than one line in fields here only one line is reqited (First Name / Family Name / Husband Name), so I added the code above to flag the error (if one or more EndOfLine character exists in the Field (named PNom above) and two others

I installed the new versions before lunch on both macOS and Windows 7 computers and noticed a difference:

On macOS, I get a small list of errors (fields with more than one line)  
On Windows 7: nothing.  
Nota: same sqlite file in both computers (I copied it from one OS to the other to be sure).  
Also: Records are added from both computers, and manually copied to the other computer when a change is done (a MacBook Pro and a WIndows tower).

All advices will be considered.

---

<div class="post-metadata">

**Author:** ![Christian\_Schmitz](https://forum.xojo.com/user_avatar/forum.xojo.com/christian_schmitz/32/158_2.png) [@Christian\_Schmitz](https://forum.xojo.com/u/Christian_Schmitz)\
**Post date:** [January 25, 2019, 2:43pm UTC](https://forum.xojo.com/t/sqlite-and-endofline-on-multiplatform-app/47126/2 "2019-01-25T14:43:50Z")

</div>

ReplaceLineEndings may be needed.  
Or on Windows you look for EndofLine.Macintosh?

---

<div class="post-metadata">

**Author:** ![Jay\_Madren](https://forum.xojo.com/user_avatar/forum.xojo.com/jay_madren/32/6425_2.png) [@Jay\_Madren](https://forum.xojo.com/u/Jay_Madren)\
**Post date:** [January 25, 2019, 2:46pm UTC](https://forum.xojo.com/t/sqlite-and-endofline-on-multiplatform-app/47126/3 "2019-01-25T14:46:33Z")

</div>

EndOfLine character(s) are different for the different platforms. Since you use multiple platforms to input data, you’ll have to search for all the possible EndOfLine characters. See [https://documentation.xojo.com/index.php?title=EndOfLine&oldid=55077](https://documentation.xojo.com/index.php?title=EndOfLine&oldid=55077)

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [January 25, 2019, 3:02pm UTC](https://forum.xojo.com/t/sqlite-and-endofline-on-multiplatform-app/47126/4 "2019-01-25T15:02:34Z")

</div>

Christian, Jay: thank you for your answers.

So, EndOfLine is not multiplatform !

Excepted if there is another solution, all I have to Clean one db, move it to the other computer then in the application reject the EndOfLine.\<this\_platform\> (since it is the same as EndOfLine.Linux) for future New Records (or something like that).

Am I right ?

---

<div class="post-metadata">

**Author:** ![Jay\_Madren](https://forum.xojo.com/user_avatar/forum.xojo.com/jay_madren/32/6425_2.png) [@Jay\_Madren](https://forum.xojo.com/u/Jay_Madren)\
**Post date:** [January 25, 2019, 3:06pm UTC](https://forum.xojo.com/t/sqlite-and-endofline-on-multiplatform-app/47126/5 "2019-01-25T15:06:42Z")

</div>

Yes, if you clean your db, then have code in place to prevent new EndOfLine characters from being saved, then you will be fine.

---

<div class="post-metadata">

**Author:** ![Jay\_Madren](https://forum.xojo.com/user_avatar/forum.xojo.com/jay_madren/32/6425_2.png) [@Jay\_Madren](https://forum.xojo.com/u/Jay_Madren)\
**Post date:** [January 25, 2019, 3:09pm UTC](https://forum.xojo.com/t/sqlite-and-endofline-on-multiplatform-app/47126/6 "2019-01-25T15:09:01Z")

</div>

> [@422532:@Emile Schwarz](#):
>
> So, EndOfLine is not multiplatform

Actually, EndOfLine is multiplatform - it contains the default EndOfLine character(s) for the current platform. There’s no magic - it’s basically just a compiled constant.

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [January 25, 2019, 3:33pm UTC](https://forum.xojo.com/t/sqlite-and-endofline-on-multiplatform-app/47126/7 "2019-01-25T15:33:39Z")

</div>

> [@422533:@Jay Madren](#):
>
> have code in place

When I added the previous code, I resolved an immediate trouble; I do not think forward enough (I certainly had something else in mind at that time).

Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 7:32pm UTC](https://forum.xojo.com/t/sqlite-and-endofline-on-multiplatform-app/47126/8 "2020-10-29T19:32:19Z")

</div>


