Re: How do you set a value to Null in a DataSet when it's normally set to another table through a relation
From: W.G. Ryan eMVP (WilliamRyan_at_NoSpam.gmail.com)
Date: 10/22/04
- Next message: W.G. Ryan eMVP: "Re: Databinding woes"
- Previous message: Scave: "Re: MasterDetail Datagrid and Dataviews"
- In reply to: Benny Raymond: "How do you set a value to Null in a DataSet when it's normally set to another table through a relation"
- Next in thread: Benny Raymond: "Re: How do you set a value to Null in a DataSet when it's normally set to another table through a relation"
- Reply: Benny Raymond: "Re: How do you set a value to Null in a DataSet when it's normally set to another table through a relation"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 21 Oct 2004 20:21:21 -0400
If it doesn't reference the other table at all it's an Orphan which is what
the key there to prevent. You can try disabling the constraints but I
think that'd be a bad choice.
-- W.G. Ryan MVP (Windows Embedded) TiBA Solutions www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com "Benny Raymond" <benny@pocketrocks.com> wrote in message news:aJXdd.20086$l07.13127@twister.nyroc.rr.com... > I currently have a relation set up between two tables in my dataset. > Sometimes I'd like to set the value in the Foreign Key Field to NULL (if > it doesn't refrence the other table at all). > > Currently i'm getting an error no matter what I try to use: > 0 > Nothing > Convert.DBNull > > Does anyone have experience in this area? I posted this question a few > days ago, but I didn't have as clear of an understanding as I do right > now. Currently I can set this field to Null using the data grid, > however I havn't been able to figure out how to add a row with this > field set to Null - it always gives an error :( > > ~Benny
- Next message: W.G. Ryan eMVP: "Re: Databinding woes"
- Previous message: Scave: "Re: MasterDetail Datagrid and Dataviews"
- In reply to: Benny Raymond: "How do you set a value to Null in a DataSet when it's normally set to another table through a relation"
- Next in thread: Benny Raymond: "Re: How do you set a value to Null in a DataSet when it's normally set to another table through a relation"
- Reply: Benny Raymond: "Re: How do you set a value to Null in a DataSet when it's normally set to another table through a relation"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|