[V4MD] unique between two fields

info at vallemediatime.com info at vallemediatime.com
Sat Nov 5 15:18:57 CST 2005


----- Original Message -----
From: "Ivan Smahin" <IvanSmahin at public.kherson.ua>
To: "Valentina Beta" <valentina-beta at lists.macserve.net>
Sent: Saturday, November 05, 2005 2:51 PM
Subject: Re[4]: [V4MD] unique between two fields


> Hello info,
>
> Saturday, November 5, 2005, 3:36:13 PM, you wrote:
>
> ivc> Hi Ivan,
>
> ivc> I've not better understand, sorry
> ivc> my code for create table and fields is a bit different:
>
> ivc> eg
> ivc> Discipline = gDb.createTable("Discipline ")
> ivc> Discipline .createStringField("Discipline_Name",  36)
> ivc> Discipline .createStringField("Discipline_Year",  9)  -- (eg
2005-2006)
>
> ivc> I've tried to modify this with your useful help but I get error...
>
> The main idea is:
> You need the method which is unique and combine both fields.
>
> So you need something like
> Discipline.createStringField("Discipline_NameYear",  40, kUnique,
> "Discipline_Name || Discipline_Year" )

thanks, this works:
Discipline.createStringField("Discipline_NameYear",  40, #kUnique,
"Discipline_Name || Discipline_Year" )

last suggestion:
I must keep the two fields "Discipline_Name" and  "Discipline_Year"  for
show distinct value to final user
and add a third 'method field' for check the unique of combine fields? ...
in this manner the db size augmented



> --
> Best regards,
>  Ivan                            mailto:IvanSmahin at public.kherson.ua
>
> _______________________________________________
> Valentina-beta mailing list
> Valentina-beta at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina-beta
>



More information about the Valentina-beta mailing list