Related Record Count Syntax Please

Ruslan Zasukhin sunshine at public.kherson.ua
Sun Dec 19 00:10:54 CST 2004


On 12/18/04 11:58 PM, "Chuck Pelto" <cbpelto at pcisys.net> wrote:

> Sounds interesting. When is this due out? And when for Realbasic?

For REALBasic -- right now.
Go to beta list, get URL, download V4RB 2.0 b32 and enjoy.
 
> But back to the original question....
> 
> [1] It sounds like I have to delve into SQL, for the time being, to get
> the count of related records.

Just you can do this in a little simple way.
Let you have some record in T1. You know its RecID.

So you can do SQL quyry

  curs = SELECT RecID FRON T2 WHERE Ptr = recid
  res = curs.RecordCont


> The follow-on question is....
> 
> How do I retrieve data from fields of a child data file? Specifically,
> I'm working on Valentina Tutorial #3; modifying it. I have added a
> ListBox to the RB Window 1 that shows the data from  the Task data file
> that relate to the parent record.
> 
> The first part was to determine the count of related records, which
> must, apparently, be done using SQL. The next part is to extract the
> related record data to be displayed in the rows of the listbox.
> 
> Could I have an example of the syntax to accomplish this?

Above SQL query do exactly what you want.

> Regards,
> 
> Chuck
> 
> On Dec 18, 2004, at 2:27 PM, Ruslan Zasukhin wrote:
> 
>> On 12/18/04 11:18 PM, "Peter De Berdt" <peter.de.berdt at pandora.be>
>> wrote:
>> 
>>>> Hi Peter,
>>>> 
>>>> Is there any way to do this WITHOUT going to an SQL search?
>>>> 
>>>> There IS the call for RecordCount in the reference manual. Is there a
>>>> way to use BaseObject pointers and achieve this?
>>>> 
>>> A RecordCount is ALWAYS a property of a cursor. In fact, when you ask
>>> for the RecordCount of a BaseObject, it's as if you would do a "SELECT
>>> * FROM Table". Why do you want to avoid querying the database?
>> 
>> To warm interest to 2.0 more.
>> 
>> In Valentina 2.0 we open to V4RB and V4MD developers
>> a new unique API to be able do all work with no SQL.
>> 
>> In other words
>> 
>>     now C++, V4RB and V4MD developers, using v2.0
>>     can do ANY database task without SQL at all.
>> 
>> Of course if you not use SQL then you do not get access to its feature
>> as
>> Join, GROUP BY. But C++ developers will be able do even join without
>> SQL :-)
>> May be future we will open this API to V4RB and V4MD also.
>> 
>> 
>> We do this not because we do not like SQL.
>> Of course no. Just Valentina now give you 2 complete ways to resolve
>> tasks.
>> Choose any you like...or even mix them.


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

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




More information about the Valentina mailing list