Re: Best practice for inserting new DataRows with lots of 'not nul
From: KC (KC_at_discussions.microsoft.com)
Date: 09/04/04
- Next message: Dot net work: "How to access individual table column data?"
- Previous message: William \(Bill\) Vaughn: "Re: Informix Connection"
- In reply to: Lorenz Kahl: "Re: Best practice for inserting new DataRows with lots of 'not nul"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 3 Sep 2004 20:29:02 -0700
Use '' as default value
"Lorenz Kahl" wrote:
> Hi,
>
> thank you both for your answers. I still don't think they'll solve my
> problem.
>
> > "Thomas" wrote:
> >>If I'm not mistaken, can't you set a default value on a DataColumn? I
> >>believe that would solve your problem.
>
> I think it makes no sense filling in a default value in not nullable
> fields. The not null-constraint enforces a user input. What would be a
> good default value for an email address or a telephone number anyway?
>
> Chris Spahn wrote:
> > Don't add the row to the member table until the user hits the save button.
>
> Well that's what I would like to do. But how do I let the user fill in
> the values if the columns of the row cannot be bound to the controls?
> In order to 'display the empty row' for the user to be able to make the
> proper input, it must be added to the table beforehand, because all the
> textboxes (used for display and editing) are bound to that DataTable.
> And that's where the clash is.
>
> One way I thought of would be to disable the EnforceConstraints property
> temporarily - but that might lead to a bunch of other problems. Maybe
> it's really the best way to have a seperate modal form for creating and
> filling a new MemberRow...
>
> But I think there are other ways that are more elegant...
>
>
>
>
>
>
>
- Next message: Dot net work: "How to access individual table column data?"
- Previous message: William \(Bill\) Vaughn: "Re: Informix Connection"
- In reply to: Lorenz Kahl: "Re: Best practice for inserting new DataRows with lots of 'not nul"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|