PC Review


Reply
Thread Tools Rate Thread

Dataset constraints

 
 
Woody Splawn
Guest
Posts: n/a
 
      29th Jul 2005
A question please.

Lets say I have a grid with its datasource as a dataset with three columns
in it; UserID (an auto generated ID), LastName and FirstName. Additionally,
lets say I want to restrict the user from entering two records with the same
last name and first name. I have created a constraint for LastName
FirstName in the dataset but I would like a different message than the
default message I get when the constraint is violated. Is there a way for
me to do this?





 
Reply With Quote
 
 
 
 
David Browne
Guest
Posts: n/a
 
      29th Jul 2005

"Woody Splawn" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>A question please.
>
> Lets say I have a grid with its datasource as a dataset with three columns
> in it; UserID (an auto generated ID), LastName and FirstName.
> Additionally,
> lets say I want to restrict the user from entering two records with the
> same
> last name and first name. I have created a constraint for LastName
> FirstName in the dataset but I would like a different message than the
> default message I get when the constraint is violated. Is there a way for
> me to do this?
>


try
{
//whatever
}
catch (ConstraintException ex)
{
throw new ConstraintException("whatever");
}

David




 
Reply With Quote
 
Woody Splawn
Guest
Posts: n/a
 
      29th Jul 2005
Yes, but where? That is, where do I place a try catch statement? In what
event?

> try
> {
> //whatever
> }
> catch (ConstraintException ex)
> {
> throw new ConstraintException("whatever");
> }
>
> David
>
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dataset Constraints - again Woody Splawn Microsoft ADO .NET 2 4th Aug 2005 03:00 PM
Rows.Add and DataSet Constraints Christopher Weaver Microsoft C# .NET 2 1st Jul 2005 01:43 AM
DataSet constraints Glenn Thimmes Microsoft ADO .NET 1 31st May 2005 11:30 AM
DataSet constraints Bert Sachs Microsoft ADO .NET 1 11th May 2004 12:13 PM
Database constraints and dataset constraints Rapi Microsoft ADO .NET 1 24th Dec 2003 12:40 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:57 AM.