# Implementing a navigation set of buttons for SQLite in API2

**URL:** <https://forum.xojo.com/t/implementing-a-navigation-set-of-buttons-for-sqlite-in-api2/84887>\
**Category:** Databases\
**Created:** [April 5, 2025, 7:40pm UTC](https://forum.xojo.com/t/implementing-a-navigation-set-of-buttons-for-sqlite-in-api2/84887 "2025-04-05T19:40:00Z")\
**Posts on this page:** 12\
**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:** [April 5, 2025, 7:40pm UTC](https://forum.xojo.com/t/implementing-a-navigation-set-of-buttons-for-sqlite-in-api2/84887/1 "2025-04-05T19:40:01Z")

</div>

APIé:I’ve made searches and I get to this conclusion:

a “SELECT \* TABLE” have to be done and keep until the window close (what if I add a Record or Modify one ?)

The next simple step would be to (desing idea, not real code)

SELECT FROM RS WHERE ID=Integer

but I do not know how to concatenate the two parts of this command.

Nothing at [sqlite.com/.org](http://sqlite.com/.org),  
[SQL SELECT Statement](https://www.w3schools.com/sql/sql_select.asp)  
[SQL SELECT Statement](https://www.sqltutorial.org/sql-select/)  
[SQLite SELECT Statement](https://www.sqlitetutorial.net/sqlite-select/)

Do you provide data base contents navigation in your SQLite driven application ? If so, how ?

Xojo 2025r4.2  
Sequoia 15.4  
MacBook Pro 13" m1

---

<div class="post-metadata">

**Author:** ![TimStreater](https://forum.xojo.com/user_avatar/forum.xojo.com/timstreater/32/586_2.png) [@TimStreater](https://forum.xojo.com/u/TimStreater)\
**Post date:** [April 5, 2025, 8:15pm UTC](https://forum.xojo.com/t/implementing-a-navigation-set-of-buttons-for-sqlite-in-api2/84887/2 "2025-04-05T20:15:59Z")

</div>

> [@Emile\_Schwarz](#):
>
> a “SELECT \* TABLE” have to be done and keep until the window close (what if I add a Record or Modify one ?)

The ‘SELECT \* FROM TABLE’ gives you a RowSet, which remains valid until discarded. Adding/modifying a record does not change that RowSet.

The SELECT gives you a RowSet and you then iterate through that, so I’m not sure what you mean by ‘SELECT FROM RS WHERE ID=Integer’. You should be doing ‘SELECT \* FROM TABLE WHERE ID=integer’ and then using the resulting RowSet.

---

<div class="post-metadata">

**Author:** ![Tim\_Hare](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_hare/32/176_2.png) [@Tim\_Hare](https://forum.xojo.com/u/Tim_Hare)\
**Post date:** [April 7, 2025, 6:58am UTC](https://forum.xojo.com/t/implementing-a-navigation-set-of-buttons-for-sqlite-in-api2/84887/3 "2025-04-07T06:58:46Z")

</div>

When I add a new record, I reload the listbox with a new SELECT. Then I find the newly added record in the listbox, select it and scroll to it.

---

<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:** [April 7, 2025, 5:33pm UTC](https://forum.xojo.com/t/implementing-a-navigation-set-of-buttons-for-sqlite-in-api2/84887/4 "2025-04-07T17:33:19Z")

</div>

How work SELECT. At the first message, I put 4 different URLs that explain in detail the mos common use of SELECT to avoid getting a 5 y/o explanation about SELECT. Some lurkers may ler-arn something, but in my case, I already read that… long time ago to create version 1 of that software, in 2012-2013. Now we are using API 2, things are a bit different.

> [@TimStreater](#):
>
> I’m not sure what you mean

So, you never navigate (as a user) thru your data base. I do not want to talk about filemaker because I do not used it since the end of the 80s, but this was perfectly possible in View by Record to read since Record n, all Records until Record n = i.  
Just what you can do manually with a Rollodex.

 ![image](https://forum.xojo.com/uploads/default/original/3X/8/2/82d6e61835dccb646ad1576f111e61bf9a0d3fb8.png)

I can also use a progress bar that allows to go to Record x (the record the value at click).

I can also add a search by First Name / Last Name to go to this person because I have to update its Record.

The software have a List View (one window) to have a fast look and a Record View (another window) to read all the Record information.

Is it clear now ?

---

<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:** [April 7, 2025, 5:34pm UTC](https://forum.xojo.com/t/implementing-a-navigation-set-of-buttons-for-sqlite-in-api2/84887/5 "2025-04-07T17:34:35Z")

</div>

> [@Tim\_Hare](#):
>
> When I add a new record

Same here for the List View.

But the question is about the Record View.

A window that display all Columns for one Record.

I want to be able to navigate there.

---

<div class="post-metadata">

**Author:** ![Tim\_Hare](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_hare/32/176_2.png) [@Tim\_Hare](https://forum.xojo.com/u/Tim_Hare)\
**Post date:** [April 7, 2025, 5:59pm UTC](https://forum.xojo.com/t/implementing-a-navigation-set-of-buttons-for-sqlite-in-api2/84887/6 "2025-04-07T17:59:40Z")

</div>

It really isn’t different than before. The only difference is RowSet and SelectSQL. Where are you getting hung up?

---

<div class="post-metadata">

**Author:** ![TimStreater](https://forum.xojo.com/user_avatar/forum.xojo.com/timstreater/32/586_2.png) [@TimStreater](https://forum.xojo.com/u/TimStreater)\
**Post date:** [April 7, 2025, 6:10pm UTC](https://forum.xojo.com/t/implementing-a-navigation-set-of-buttons-for-sqlite-in-api2/84887/7 "2025-04-07T18:10:47Z")

</div>

> [@Emile\_Schwarz](#):
>
> How work SELECT. At the first message, I put 4 different URLs that explain in detail the mos common use of SELECT to avoid getting a 5 y/o explanation about SELECT. Some lurkers may ler-arn something, but in my case, I already read that… long time ago to create version 1 of that software, in 2012-2013. Now we are using API 2, things are a bit different.

The first of those is a typing error on your part. Remove the /.org and try again. At [sqite.com](http://sqite.com) (actually [sqlite.org](http://sqlite.org)) you can find the entire SQL syntax understood by SQLite - including SELECT - [Query Language Understood by SQLite](https://www.sqlite.org/lang.html). I always go to [sqlite.org](http://sqlite.org), where you have a reference (not tutorial) website created by the sqlite devs. Better answers there.

> [@Emile\_Schwarz](#):
>
> So, you never navigate (as a user) thru your data base. I do not want to talk about filemaker because I do not used it since the end of the 80s, but this was perfectly possible in View by Record to read since Record n, all Records until Record n = i.  
> Just what you can do manually with a Rollodex.

In my case, these are not databases, they are mailboxes. Implemented as an SQLite database, but the user doesn’t care about that. The emails are shown in a listbox and the user can select one to see its contents. At least one of my users has around 1000 mailboxes (I don’t understand how he keeps track of them all).

Looks like this:

 ![Screenshot 2025-04-07 at 18.52.56](https://forum.xojo.com/uploads/default/original/3X/8/0/806416407c0f1b4e9679fd6194b881f540706f06.png)

The mail selected by the user is then displayed below. The user can click on listbox headers to sort the displayed mailbox by that column (done by reloading the entire listbox and having SQLite presenting the results in the right order via an ORDER BY).

A separate search facilty allows the user to search for emails matching a number of criteria across one or many mailboxes.

---

<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:** [April 8, 2025, 6:42am UTC](https://forum.xojo.com/t/implementing-a-navigation-set-of-buttons-for-sqlite-in-api2/84887/8 "2025-04-08T06:42:20Z")

</div>

> [@TimStreater](#):
>
> The mail selected by the user is then displayed below. The user can click on listbox headers to sort the displayed mailbox by that column (done by reloading the entire listbox and having SQLite presenting the results in the right order via an ORDER BY).

I do not ant to do that.

Our difference here is your user have the list of mail (easy to do), my user do not see the list of people and the navigation is done here.  
Or he must close the wRecord window to search in the wLMist window its entry, then double click to open that entry in wRecord.

Yes, it is that hard to understand.

Galileo “and it revolve !”

---

<div class="post-metadata">

**Author:** ![Tim\_Hare](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_hare/32/176_2.png) [@Tim\_Hare](https://forum.xojo.com/u/Tim_Hare)\
**Post date:** [April 8, 2025, 7:47am UTC](https://forum.xojo.com/t/implementing-a-navigation-set-of-buttons-for-sqlite-in-api2/84887/9 "2025-04-08T07:47:02Z")

</div>

Assuming your wLMist window contains the listbox that you populated from the query, create a method(s) that you can call from wRecord to return the next or previous ID from the listbox. Increment/Decrement listbox.SelectedRowIndex, retrieve the ID from that row and return it. In wRecord, run a query to retrive just that one record.

---

<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:** [April 8, 2025, 8:01am UTC](https://forum.xojo.com/t/implementing-a-navigation-set-of-buttons-for-sqlite-in-api2/84887/10 "2025-04-08T08:01:13Z")

</div>

That is exactly what I am doing now.

Go to a window, choose, double-clik, Opens another window.  
NB. Each entry in the list view have its Record ID in Row Tag.  
So, In Record View I ask for this Record from the Data Base.

ListBox is here only for display (yes, its a displayer).  
`

How many times will you do that before sending the computer thru the window ?

---

<div class="post-metadata">

**Author:** ![Tim\_Hare](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_hare/32/176_2.png) [@Tim\_Hare](https://forum.xojo.com/u/Tim_Hare)\
**Post date:** [April 8, 2025, 3:39pm UTC](https://forum.xojo.com/t/implementing-a-navigation-set-of-buttons-for-sqlite-in-api2/84887/11 "2025-04-08T15:39:16Z")

</div>

Then you are doing it correctly. There is no overhead or lag. It should be seamless. The user won’t notice at all and your app will experience no ill effects.

---

<div class="post-metadata">

**Author:** ![Tim\_Hare](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_hare/32/176_2.png) [@Tim\_Hare](https://forum.xojo.com/u/Tim_Hare)\
**Post date:** [April 8, 2025, 3:47pm UTC](https://forum.xojo.com/t/implementing-a-navigation-set-of-buttons-for-sqlite-in-api2/84887/12 "2025-04-08T15:47:11Z")

</div>

> [@Emile\_Schwarz](#):
>
> How many times will you do that before sending the computer thru the window ?

That’s not a problem unless you’re doing something wrong. In which case, post some code so we can tell you what you’re doing wrong.
