Re: Best practice for inserting new DataRows with lots of 'not nul

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: KC (KC_at_discussions.microsoft.com)
Date: 09/04/04


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...
>
>
>
>
>
>
>



Relevant Pages

  • Re: Best practice for inserting new DataRows with lots of not nul
    ... The not null-constraint enforces a user input. ... > Don't add the row to the member table until the user hits the save button. ... 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 ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Is threading the right solution for this challenge?
    ... A typical screen "refresh" could take up to 10-15 ... the display thread (since it is only inquiring there is no danger ... interrupt itself to check for user input and react to it. ... In ACCEPT with TIMEOUT, what happens if the user was in the process of ...
    (comp.lang.cobol)
  • Re: document class
    ... Just because it is a member of CDocument does not determine which thread calls it. ... If it is global state, it is global state, and if it has nothing to do with CWinApp, then ... ever know anything about the CWinApp class. ... lump network state and display state into one class since they are completely unrelated. ...
    (microsoft.public.vc.mfc)
  • Re: best way to tackle issue with writing Data, Appending Data and Rea
    ... data that I have read from my database and the two are related. ... would help me in my display of data in a grid. ... Read user input and store user input and DataRow to a file. ... display user input and data row in a DataGrid. ...
    (microsoft.public.dotnet.framework.adonet)
  • Is threading the right solution for this challenge?
    ... Compiler: MF SE 4.2 SP2 ... Have a continually refreshing display screen that also ... responds to user input. ...
    (comp.lang.cobol)