1. Roger
  2. Valentina Database ADK
  3. Donnerstag, August 06 2020, 03:01 AM
  4.  Abonnieren via E-Mail
Hello
I Try the API_way with Xojo.

From your help "Many API methods of Valentina DB return such set, e.g. VField.FindValue() or VTable. Table.SelectAllRecords()."

Now I have my sortet vSet but I can only grab the fields from the table, but the table is not sortet. Why can I become a field value from a vSet?

This works but I need the data for sort and select from a vSet.
Listbox.CellValueAt(Count, 1) = Table.Field("Name";).Value

Regards Roger
Kommentar
There are no comments made yet.
Ivan Smahin Akzeptierte Antwort
As far as I get it - you need some sorting over the table - right?
You should simply do something like this one:

vCursor = db.SQLSelect( "SELECT * FROM t1 ORDER BY f1" )
// Then use vCursor as a vTable to get the sorted data.
Kommentar
There are no comments made yet.
Roger Akzeptierte Antwort
Thaks Ivan, this works.

But now to understand - I can fll the vSet but not use it?
Kommentar
There are no comments made yet.
Ruslan Zasukhin Akzeptierte Antwort
Hi,

Table itself is never sorted physically.

When you get VSet which has some sort order, you can just loop records of table in that order.
So you will get logically sorted records
Kommentar
There are no comments made yet.
Ruslan Zasukhin Akzeptierte Antwort
Prefer to use SQL, especially if you working with a remote vserver
Kommentar
There are no comments made yet.
Roger Akzeptierte Antwort
Ok, thanks. So it shows its better to forgott vSet to to use. :(

I have no problems to use SQL, before I change the code, I search te best way from am product. :)
Kommentar
There are no comments made yet.
Ruslan Zasukhin Akzeptierte Antwort
API way *can be* faster for LOCAL databases (or fast local networks).
Still - you need to have very good reasons go by that road.

This is kind of NO-SQL for Valentina DB.

API way - this is the most low level.
SQL way - is based internally on that API.
Kommentar
There are no comments made yet.
Roger Akzeptierte Antwort
Thanks Ruslan, is now better to understand for me.
Kommentar
There are no comments made yet.
  • Seite :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories