# Sqlite vanishing information!

**URL:** <https://forum.xojo.com/t/sqlite-vanishing-information/85972>\
**Category:** Databases\
**Created:** [July 18, 2025, 1:22am UTC](https://forum.xojo.com/t/sqlite-vanishing-information/85972 "2025-07-18T01:22:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexandre\_Cunha](https://forum.xojo.com/user_avatar/forum.xojo.com/alexandre_cunha/32/1221_2.png) [@Alexandre\_Cunha](https://forum.xojo.com/u/Alexandre_Cunha)\
**Post date:** [July 18, 2025, 1:22am UTC](https://forum.xojo.com/t/sqlite-vanishing-information/85972/1 "2025-07-18T01:22:26Z")

</div>

hi everyone!

i’m very confused…

i have this method. i insert the information. it saves on database. when i quit the app and open again, it’s not there!

why?

```auto
Var db As New SQLiteDatabase

Var dbFile As FolderItem = SpecialFolder.resources.Child("mydb.sqlite")

If dbFile <> Nil And dbFile.Exists Then
  db.DatabaseFile = dbFile
  
  Try
    db.Connect
    
    Var row As New DatabaseRow
    
    If idLevel = 0 Then
      row.Column("level").StringValue = levelText
      row.Column("author").StringValue = author
      row.Column("created").StringValue = created
      db.AddRow("levels", row)
    Else
      row.Column("idLevel").IntegerValue = idLevel
      row.Column("level").StringValue = levelText
      row.Column("author").StringValue = author
      row.Column("created").StringValue = created
      Try
        db.AddRow("levels", row)
        
      Catch err As DatabaseException
        // Se já existir, atualiza
        db.ExecuteSQL("UPDATE levels SET level = ?, author = ?, created = ? WHERE idLevel = ?", levelText, author, created, idLevel)
      End Try
    End If
    
    
    // put here just to check…
    Var sql As String = "SELECT * FROM levels"
    Var rs As RowSet = db.SelectSQL(sql)
    Var temp As String
    If rs <> Nil Then
      While Not rs.AfterLastRow
        temp = temp + "ID: " + rs.Column("idLevel").StringValue + ", " + _
        "Level: " + rs.Column("level").StringValue + ", " + _
        "Author: " + rs.Column("author").StringValue + ", " + _
        "Created: " + rs.Column("created").StringValue + EndOfLine
        rs.MoveToNextRow
      Wend
      rs.Close
    End If
    
    
  Catch err As DatabaseException
    MessageBox("Erro: " + err.Message)
  End Try
  
End If

```

---

<div class="post-metadata">

**Author:** ![Anthony\_G\_Cyphers](https://forum.xojo.com/user_avatar/forum.xojo.com/anthony_g_cyphers/32/16862_2.png) [@Anthony\_G\_Cyphers](https://forum.xojo.com/u/Anthony_G_Cyphers)\
**Post date:** [July 18, 2025, 1:23am UTC](https://forum.xojo.com/t/sqlite-vanishing-information/85972/2 "2025-07-18T01:23:25Z")

</div>

Your database is being copied to your built Resources folder. That’s the SQLite file being modified, which ceases to exist when your debug run ends and a fresh copy is grabbed the next time you debug.

You can use `#If DebugBuild Then` to use the permanent path in your source directory.

---

<div class="post-metadata">

**Author:** ![Alexandre\_Cunha](https://forum.xojo.com/user_avatar/forum.xojo.com/alexandre_cunha/32/1221_2.png) [@Alexandre\_Cunha](https://forum.xojo.com/u/Alexandre_Cunha)\
**Post date:** [July 18, 2025, 2:19am UTC](https://forum.xojo.com/t/sqlite-vanishing-information/85972/3 "2025-07-18T02:19:49Z")

</div>

omg, so stupid i was…

thank you!
