# Path to an SQLite DB

**URL:** <https://forum.xojo.com/t/path-to-an-sqlite-db/88861>\
**Category:** Getting Started\
**Created:** [September 9, 2026, 10:30am UTC](https://forum.xojo.com/t/path-to-an-sqlite-db/88861 "2026-09-09T10:30:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Armando\_SORBI](https://forum.xojo.com/user_avatar/forum.xojo.com/armando_sorbi/32/934_2.png) [@Armando\_SORBI](https://forum.xojo.com/u/Armando_SORBI)\
**Post date:** [September 9, 2026, 10:30am UTC](https://forum.xojo.com/t/path-to-an-sqlite-db/88861/1 "2026-09-09T10:30:47Z")

</div>

Hello,

I recently switched to Apple’s iCloud service and I’d like to move all my SQLite DB inside folders in iCloud, mostly for syncing reasons. I’ know SQLite shouldn’t be use in clouds etc. but, accepting the risk, how should I address the dbPathe to reach said DBs? In normal situations it goes: dbPath = Documents.Child(… but now there is a Document folder inside iCloud and I don’t know how to reach it.

Thank you

---

<div class="post-metadata">

**Author:** ![MarkusR](https://forum.xojo.com/user_avatar/forum.xojo.com/markusr/32/685_2.png) [@MarkusR](https://forum.xojo.com/u/MarkusR)\
**Post date:** [September 9, 2026, 10:46am UTC](https://forum.xojo.com/t/path-to-an-sqlite-db/88861/2 "2026-09-09T10:46:17Z")

</div>

i think you enable documents sync in OS (that cloud data are local too), and then before you use this database  
copy it temporary, use it from there, and after you finished copy it back that it will sync (copy) to cloud by OS.

correctly you would use a database server.

or this iCloud solutions is more a backup for youself.

---

<div class="post-metadata">

**Author:** ![Marvin\_Clavey](https://forum.xojo.com/letter_avatar_proxy/v4/letter/m/43a26b/32.png) [@Marvin\_Clavey](https://forum.xojo.com/u/Marvin_Clavey)\
**Post date:** [September 9, 2026, 11:30am UTC](https://forum.xojo.com/t/path-to-an-sqlite-db/88861/3 "2026-09-09T11:30:28Z")

</div>

App.db.DatabaseFile = SpecialFolder._ **PathToIcloud** _.Child(filePath).Child(fileName)

---

<div class="post-metadata">

**Author:** ![Armando\_SORBI](https://forum.xojo.com/user_avatar/forum.xojo.com/armando_sorbi/32/934_2.png) [@Armando\_SORBI](https://forum.xojo.com/u/Armando_SORBI)\
**Post date:** [September 9, 2026, 2:10pm UTC](https://forum.xojo.com/t/path-to-an-sqlite-db/88861/4 "2026-09-09T14:10:40Z")

</div>

Yes, I could copy thema back and forth but it’s rather inconvenient, I’d like to leave them there and use them from there

---

<div class="post-metadata">

**Author:** ![Christian\_Wheel](https://forum.xojo.com/user_avatar/forum.xojo.com/christian_wheel/32/20536_2.png) [@Christian\_Wheel](https://forum.xojo.com/u/Christian_Wheel)\
**Post date:** [September 9, 2026, 7:39pm UTC](https://forum.xojo.com/t/path-to-an-sqlite-db/88861/5 "2026-09-09T19:39:05Z")

</div>

The reason to copy them to a static path and back is because in the cloud folder, every write query will trigger a sync and be another possibility of a write collision which can corrupt your db. Copying it to a temporary location, making your changes, then copying it back only has a single chance of that.

Copying an intact database file also does a sequential write of the file to the destination rather than a write to a random position and lessens the chance of a sync interfering with the operation.

But the iCloud Drive folder is typically at `SpecialFolder.UserHome.Child("Library").Child("Mobile Documents").Child("com~apple~CloudDocs")`
