Integrating three tables

jda jda at his.com
Fri Dec 9 12:09:38 CST 2005


>
>     query = "INSERT INTO TableB (refPtr, MoreFieldContents, lablePtr)
>                 VALUES( 11, 'something', 1 )"
>
>     db.SqlExecute( query )
>
>

Hi Ruslan,

That works, great! Next question: how to I find out if the field 
already exists so I UPDATE instead of INSERT?

Right now I have a cursor with the record from the main table (Table 
A), from which I get the RecID. How to query the table "morefields" 
(Table B) to see if an entry exists that is linked to a record in 
Table A and a LabelPtr in Table C? Is there an API (table)-based way, 
or is SQL better?

Thanks,

Jon


More information about the Valentina mailing list