1. Roger
  2. Valentina Database ADK
  3. Thursday, August 06 2020, 03:01 AM
  4.  Subscribe via email
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
Comment
There are no comments made yet.
Ivan Smahin Accepted Answer
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.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 1
Roger Accepted Answer
Thaks Ivan, this works.

But now to understand - I can fll the vSet but not use it?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 2
Ruslan Zasukhin Accepted Answer
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
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 3
Ruslan Zasukhin Accepted Answer
Prefer to use SQL, especially if you working with a remote vserver
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 4
Roger Accepted Answer
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. :)
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 5
Ruslan Zasukhin Accepted Answer
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.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 6
Roger Accepted Answer
Thanks Ruslan, is now better to understand for me.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 7
  • Page :
  • 1


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