Click here to Skip to main content
15,904,153 members
Home / Discussions / Database
   

Database

 
GeneralRe: Finding the primary key Pin
Mike Dimmick7-Jul-04 5:17
Mike Dimmick7-Jul-04 5:17 
GeneralRe: Finding the primary key Pin
Colin Angus Mackay7-Jul-04 5:28
Colin Angus Mackay7-Jul-04 5:28 
GeneralRe: Finding the primary key Pin
Grimolfr7-Jul-04 5:46
Grimolfr7-Jul-04 5:46 
GeneralRe: Finding the primary key Pin
Colin Angus Mackay7-Jul-04 6:01
Colin Angus Mackay7-Jul-04 6:01 
GeneralRe: Finding the primary key Pin
Grimolfr7-Jul-04 6:15
Grimolfr7-Jul-04 6:15 
GeneralCannot call Oracle stored procedure from C++ Pin
pankajdaga6-Jul-04 9:35
pankajdaga6-Jul-04 9:35 
GeneralRe: Cannot call Oracle stored procedure from C++ Pin
Chris Meech7-Jul-04 3:04
Chris Meech7-Jul-04 3:04 
GeneralADO.NET - BindingContext and Disappearing Rows Pin
mikasa6-Jul-04 8:54
mikasa6-Jul-04 8:54 
I am using a DataSet which contains two DataTables. The 2 Tables are related using a DataRelation and it's a One-to-One Relationship. On a Form, I create a DataView for the Top-Level Parent Table and access the Child table through the DataMember when using the BindingContext.

One my Form, I am using Me.BindingContext(dvData).AddNew() for the Parent Table. I then use Me.BindingContext(dvData, "ChildRelationship").AddNew() to Add a new Record at the Child Level. I do this because the Form edits data in both Tables at the same time so that to the User, they will not have to make 2 edits just to get data in both tables.

When I debug after doing this, everything is great! I can see both new Rows added to the DataView and the Form works as expected since it is data bound.

However, in my Save Routine, I modify a few Columns if the Data wasn't supplied, and lastly call the Me.BindingContext(dvData).EndCurrentEdit() and Me.BindingContext(dvData, "ChildRelationship").EndCurrentEdit(). When I do this, and attempt to save the Data back to the Database, it has the Parent Row, but the Child Table's Row (that was previously there) is no longer there! Filtering the DataTable on only Modified / New Rows results in no data, and also the Row Count is the same as before any Rows were added. It's as if the New Row on the Child Table just disappeared!!! WTF | :WTF:

Does anyone have any insight?? Confused | :confused:
GeneralArabic to English Conversion Pin
Anonymous6-Jul-04 7:13
Anonymous6-Jul-04 7:13 
Generaloverwite/add between two databases help Pin
Anonymous6-Jul-04 3:51
Anonymous6-Jul-04 3:51 
Questioncan anyone optimize this query Pin
xcavin6-Jul-04 3:15
xcavin6-Jul-04 3:15 
AnswerRe: can anyone optimize this query Pin
RichardGrimmer6-Jul-04 4:12
RichardGrimmer6-Jul-04 4:12 
AnswerRe: can anyone optimize this query Pin
Michael Potter6-Jul-04 7:28
Michael Potter6-Jul-04 7:28 
GeneralRe: can anyone optimize this query Pin
xcavin6-Jul-04 19:27
xcavin6-Jul-04 19:27 
GeneralRe: can anyone optimize this query Pin
xcavin6-Jul-04 20:03
xcavin6-Jul-04 20:03 
GeneralRe: can anyone optimize this query Pin
Michael Potter7-Jul-04 3:13
Michael Potter7-Jul-04 3:13 
AnswerRe: can anyone optimize this query Pin
michanne6-Jul-04 15:36
michanne6-Jul-04 15:36 
GeneralSQL connection Pin
tennis045-Jul-04 20:07
tennis045-Jul-04 20:07 
GeneralRe: SQL connection Pin
Michael Potter6-Jul-04 7:37
Michael Potter6-Jul-04 7:37 
GeneralRe: SQL connection Pin
tennis047-Jul-04 19:53
tennis047-Jul-04 19:53 
GeneralRe: SQL connection Pin
Michael Potter8-Jul-04 3:07
Michael Potter8-Jul-04 3:07 
GeneralRe: SQL connection Pin
tennis048-Jul-04 15:10
tennis048-Jul-04 15:10 
GeneralRe: SQL connection Pin
Michael Potter9-Jul-04 3:36
Michael Potter9-Jul-04 3:36 
GeneralTable name a String Pin
si_695-Jul-04 0:21
si_695-Jul-04 0:21 
GeneralRe: Table name a String Pin
michanne15-Jul-04 5:50
michanne15-Jul-04 5:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.