# Sqlite database access across multiple web pages

**URL:** <https://forum.xojo.com/t/sqlite-database-access-across-multiple-web-pages/25505>\
**Category:** Web\
**Created:** [July 15, 2015, 7:21am UTC](https://forum.xojo.com/t/sqlite-database-access-across-multiple-web-pages/25505 "2015-07-15T07:21:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anthony\_Houston](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/f1d935/32.png) [@Anthony\_Houston](https://forum.xojo.com/u/Anthony_Houston)\
**Post date:** [July 15, 2015, 7:21am UTC](https://forum.xojo.com/t/sqlite-database-access-across-multiple-web-pages/25505/1 "2015-07-15T07:21:17Z")

</div>

Is Sqlite database access public or private across multiple web pages in the same session.

I have a home page where I check for the existences of a database and if not then I create one. I store the dbfile name and other info in the session folder so I can access them from various web pages.

In order to access this database from any web page do I need to DIM mDB as NewSQLDatabase(session.dbfile) etc all over again or can I just dbfile = session.dbfile, if mDbConnect then (etc) (I know that’s note correct code but I hope you get the drift).

I suppose the crux of the question is does the (can the) database remain connected across web pages during the session.

---

<div class="post-metadata">

**Author:** ![Wayne\_Golding](https://forum.xojo.com/user_avatar/forum.xojo.com/wayne_golding/32/165_2.png) [@Wayne\_Golding](https://forum.xojo.com/u/Wayne_Golding)\
**Post date:** [July 15, 2015, 7:38am UTC](https://forum.xojo.com/t/sqlite-database-access-across-multiple-web-pages/25505/2 "2015-07-15T07:38:57Z")

</div>

If you add the db as a property of the session then it will be available to all webpages belonging to that session.

---

<div class="post-metadata">

**Author:** ![Anthony\_Houston](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/f1d935/32.png) [@Anthony\_Houston](https://forum.xojo.com/u/Anthony_Houston)\
**Post date:** [July 21, 2015, 10:35pm UTC](https://forum.xojo.com/t/sqlite-database-access-across-multiple-web-pages/25505/3 "2015-07-21T22:35:45Z")

</div>

Thank you Wayne,

I had already added the db as a property of the session but am having problems with the connect so I needed to check I was on the right track.

Appreciated.

---

<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, 5:50pm UTC](https://forum.xojo.com/t/sqlite-database-access-across-multiple-web-pages/25505/4 "2020-10-29T17:50:52Z")

</div>


