1. Roger
  2. Valentina Database ADK
  3. Четверг, Август 06 2020, 03:01 AM
  4.  Подписаться через 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
Комментарий
There are no comments made yet.
Ivan Smahin Ответ принят
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.
Комментарий
There are no comments made yet.
Roger Ответ принят
Thaks Ivan, this works.

But now to understand - I can fll the vSet but not use it?
Комментарий
There are no comments made yet.
Ruslan Zasukhin Ответ принят
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
Комментарий
There are no comments made yet.
Ruslan Zasukhin Ответ принят
Prefer to use SQL, especially if you working with a remote vserver
Комментарий
There are no comments made yet.
Roger Ответ принят
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. :)
Комментарий
There are no comments made yet.
Ruslan Zasukhin Ответ принят
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.
Комментарий
There are no comments made yet.
Roger Ответ принят
Thanks Ruslan, is now better to understand for me.
Комментарий
There are no comments made yet.
  • Страница :
  • 1


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