[V4RB] Adding unique relational records...

Joerg Pressel joergp at three-2-one.com
Tue Oct 5 20:52:35 CDT 2004


> I do not understand why you use string search for Artist ?
>
>>   cur = database.SQLSelect("select RecID from Artists where Artist='"
>> + escStr(s) + "' no_case")
>
> Btw, no_case have sense only for LIKE.

OK – thanks.

> Must be
>
>     where Artists = 145
>                     ^^^^ number

No.

Table boArtist has one field Artist as VVarChar which holds the artist 
name.
Table boTracks has mArtistPtr as VObjectPtr that points to boArtist.

I want to add a new artist: so in boTracks I call my function in 
boArtist to add a new unique artist and get back its RecID:
(add other fields here)
mArtistPtr.value = musicDatabase(dataBase).mArtists.AddArtist(artist)
AddRecord

Is this there an easier way?


More information about the Valentina mailing list