[V4MD] API way: search in all fields

Igor Gomon giv at tlc.kherson.ua
Thu Mar 31 18:49:38 CST 2005


Paolo, 

> I have already read with attention your examples
> but in  Examples/API_Way/Field_Find.dir 
> you use one table "Person" not multiple tables, right?
Right.

You can, of course, use API way for multicolumn and even 
for multitable searches. But this way will (often) require extra 
coding from you. You will need to create link between tables,
then to use navigational methods (like, VTable.findLinked())
to navigate from records of one table to the linked records 
from the second (linked) table (for example, in 1:M relationship).
So this way may be good when you want to show explicit 
relationship between objects (records in the table). For example,
in your application GUI you can easily display relationship 
between two linked entities, using, for example, two windows.
When user selects object from one window then he/she see related 
objects in the second window. You can easily do such tasks with 
API way. This way is called "Navigational model". 

Instead, SQL-queries is "Relational model". In SQL way you 
always work with record sets. This way is convenient to get 
linear results from, for example, multitable searches that uses 
joins between tables, and to display then result as a flat 
table with records.

So for your case, I think, will be more convenient and easy to use 
SQL way because your task is good fit into relational model tasks.
Actually, when you solve this task with API way you will do the 
same steps that SQL way does for you (in this case) implicitly.

Also, early on this list already was dissussion on when 
and where to use SQL & API way. Unfortunately I cannot 
find this letter.

> I wait an answer for two yesterday question:
> -- cXtraStringGrid example
I think we can do this a bit later because currently I am 
busy on different tasks. But you can go to the 
cXtraStringGrid web site and search for examples on how 
to display data from the database in this control. 
AFAIK, there were examples on the web-site that displays
use of this Xtra to display data from the Valentina 1.x database.

> -- limit (I think) of actually iterator
I think that you, probably misunderstood destination on 
VSetIterator Xtra. It was designed to iterate through 
*record sets* not *field sets*. Again you can use SQL 
way to select to only needed fields. 

P.S. Please, send you letters to the main Valentina 
list (valentina at lists.macserve.net). This list is for the 
beta-discussions.

-- 
Best regards,
Igor Gomon
-------------------------------------------------------------
e-mail: giv at tlc.kherson.ua
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://listserv.macserve.net/mailman/listinfo/valentina




More information about the Valentina-beta mailing list