Hi,

I have have dataset on the client side and I would like to set it up so that
it cant take data entered that isnt unique on two columns. There is
obviously the unique property of each column , but they work indepedant, im
looking for something that will be unique on more than one column.

Thanks

Re: Programatically unique by Marina

Marina
Thu Jun 08 08:24:47 CDT 2006

I would create an expression column which stores the result of concatenating
the two columns separated by a | character. Then make that column unique.
I'm not sure if you can make expression columns unique, but if you can, this
should work.
Otherwise, you can roll your own expression column by defining a column and
manually updating it to this value, and having this regular column be marked
as having to be unique.

"Jon Vaughan" <jonnyvaughan@hotmail.com> wrote in message
news:unShg.36468$Bk2.19404@fe05.news.easynews.com...
> Hi,
>
> I have have dataset on the client side and I would like to set it up so
> that it cant take data entered that isnt unique on two columns. There is
> obviously the unique property of each column , but they work indepedant,
> im looking for something that will be unique on more than one column.
>
> Thanks
>



Re: Programatically unique by AMDRIT

AMDRIT
Thu Jun 08 08:33:45 CDT 2006

A guid would make the row unique.

"Jon Vaughan" <jonnyvaughan@hotmail.com> wrote in message
news:unShg.36468$Bk2.19404@fe05.news.easynews.com...
> Hi,
>
> I have have dataset on the client side and I would like to set it up so
> that it cant take data entered that isnt unique on two columns. There is
> obviously the unique property of each column , but they work indepedant,
> im looking for something that will be unique on more than one column.
>
> Thanks
>



Re: Programatically unique by Jon

Jon
Thu Jun 08 08:38:53 CDT 2006

Nice suggestion - Thanks

"Marina Levit [MVP]" <someone@nospam.com> wrote in message
news:%23fomr7viGHA.3780@TK2MSFTNGP03.phx.gbl...
>I would create an expression column which stores the result of
>concatenating the two columns separated by a | character. Then make that
>column unique. I'm not sure if you can make expression columns unique, but
>if you can, this should work.
> Otherwise, you can roll your own expression column by defining a column
> and manually updating it to this value, and having this regular column be
> marked as having to be unique.
>
> "Jon Vaughan" <jonnyvaughan@hotmail.com> wrote in message
> news:unShg.36468$Bk2.19404@fe05.news.easynews.com...
>> Hi,
>>
>> I have have dataset on the client side and I would like to set it up so
>> that it cant take data entered that isnt unique on two columns. There is
>> obviously the unique property of each column , but they work indepedant,
>> im looking for something that will be unique on more than one column.
>>
>> Thanks
>>
>
>



Re: Programatically unique by Miha

Miha
Thu Jun 08 09:33:56 CDT 2006

Hi Jon,

Did you check UniqueConstraint class?

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

"Jon Vaughan" <jonnyvaughan@hotmail.com> wrote in message
news:unShg.36468$Bk2.19404@fe05.news.easynews.com...
> Hi,
>
> I have have dataset on the client side and I would like to set it up so
> that it cant take data entered that isnt unique on two columns. There is
> obviously the unique property of each column , but they work indepedant,
> im looking for something that will be unique on more than one column.
>
> Thanks
>