1:m Relation

Ruslan Zasukhin sunshine at public.kherson.ua
Sat Feb 11 21:18:22 CST 2006


On 2/11/06 8:11 PM, "Beatrix Willius" <bwillius at gmx.de> wrote:

Hi Beatrix,

> I'm trying to show the child records to a parent record. There are
> two tables, Message and Attachment. Every Message record can have
> more than one Attachment records. Creation works okay. I use an
> object pointer for reference between the tables. Restricting the
> cursor gives me trouble:
 
> dim AttachmentCursor as VCursor = theDatabase.SqlSelect("select
> AttachmentName from Attachment", kV_Server, kV_ReadWrite, kV_Random)
> 
> gives me all records in the Attachment table.
> 
> Restrictions via MailID (the object pointer) don't seem to work. The
> following code always gives a nil cursor. The value 3 has records!
> 
> dim AttachmentCursor as VCursor = theDatabase.SqlSelect("select
> MailID, AttachmentName from Attachment where MailID = 3", kV_Server,
> kV_ReadWrite, kV_Random)
> 
> Having played around a bit with Valentina Studio, I get the error 372
> with this query. The only information on this error that I found was
> a corrupted index.

So try just REINDEX database!

You can do this in Vstudio itself. Exists such menu command,
And contextual menu have this item
 
> When I try a similar query on the old "Example 3 Two Table", it works
> as it should. Totally confused... Using V4RB 1.11 with Realbasic
> 2005R4 and Mac OS 10.4


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list