1:m Relation

Beatrix Willius bwillius at gmx.de
Sat Feb 11 19:11:44 CST 2006


Hello,

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.

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


Mit freundlichen Grüßen/Regards

Trixi Willius

http://www.mothsoftware.com
Mail Archiver X: archive, clean and search email
http://www.beatrixwillius.de
Fractals, 3d landscapes etc.



More information about the Valentina mailing list