Click here to Skip to main content
15,920,801 members
Home / Discussions / Database
   

Database

 
GeneralRe: Convert Access97 to 2000 programmatically Pin
Mike Ellison2-Oct-03 10:16
Mike Ellison2-Oct-03 10:16 
Generalerror in class type Pin
ranjjj1-Oct-03 5:02
ranjjj1-Oct-03 5:02 
Generalbcp Pin
sardinka1-Oct-03 3:07
sardinka1-Oct-03 3:07 
GeneralUpdating Related Tables Pin
Wjousts30-Sep-03 11:07
Wjousts30-Sep-03 11:07 
GeneralRe: Updating Related Tables Pin
STW2-Oct-03 7:29
STW2-Oct-03 7:29 
GeneralRe: Updating Related Tables Pin
Wjousts2-Oct-03 8:54
Wjousts2-Oct-03 8:54 
GeneralRe: Updating Related Tables Pin
STW2-Oct-03 22:31
STW2-Oct-03 22:31 
GeneralRe: Updating Related Tables Pin
Wjousts3-Oct-03 4:52
Wjousts3-Oct-03 4:52 
STW wrote:
1. Did you call AcceptChanges somewhere? Don't call AcceptChanges before Adap.Update().

No, I have not called AcceptChanges explictly anywhere in my program. I had thought that perhaps calling update on the main table might automatically call AcceptChanges on the child table, but not updating the main table didn't fix the problem. I was also thinking that calling AcceptChanges should move the proposed value into the original value shouldn't it? That's not been happening.

STW wrote:
2. Clear the EventHandler for RowUpdate. This may call AcceptChanges()

I tried it without the EventHandler and it makes no difference. I only put the EventHandler there in the hopes of being able to intercept the call and figure out what was happening. As it turns out, the event never gets fired.


STW wrote:
3. Try to edit a Row and immediatly afterwards check it's RowState. If the RowState is unchanged I don't know what's wrong. AcceptChanges is a tricky thing: after this call all Rows are marked unchanged! So there is nothing what could be Updated by the Update Method of Apt.

Okay, I tried manually changing the value of one field in the child table like this:

<br />
m_myDS.Tables["subtable"].Rows[0]["Field1"] = 101;<br />


And if I then iterate through the rows in the table, I can see that row has been changed to RowState.Modified and it doesn't have a proposed value anymore. Further, when I call the update that row does, in fact, get updated in the database.
GeneralRe: Updating Related Tables Pin
Wjousts3-Oct-03 5:20
Wjousts3-Oct-03 5:20 
Generalwhere close Pin
sardinka30-Sep-03 5:05
sardinka30-Sep-03 5:05 
GeneralRe: where close Pin
Edbert P16-Oct-03 20:45
Edbert P16-Oct-03 20:45 
Generaladd record to a database Pin
ranjjj30-Sep-03 4:33
ranjjj30-Sep-03 4:33 
GeneralGetting the SQL commands from OleDbDataAdapter.Update Pin
Wjousts29-Sep-03 10:38
Wjousts29-Sep-03 10:38 
GeneralRe: Getting the SQL commands from OleDbDataAdapter.Update Pin
Guillermo Rivero29-Sep-03 11:53
Guillermo Rivero29-Sep-03 11:53 
GeneralRe: Getting the SQL commands from OleDbDataAdapter.Update Pin
Wjousts29-Sep-03 12:18
Wjousts29-Sep-03 12:18 
GeneralRe: Getting the SQL commands from OleDbDataAdapter.Update Pin
Wjousts30-Sep-03 4:57
Wjousts30-Sep-03 4:57 
GeneralRedistribute MS DataGrid Control Pin
pallattila29-Sep-03 7:57
pallattila29-Sep-03 7:57 
GeneralRe: Redistribute MS DataGrid Control Pin
Steve S30-Sep-03 5:21
Steve S30-Sep-03 5:21 
GeneralSQLServer and XML RAW Pin
Guillermo Rivero29-Sep-03 7:45
Guillermo Rivero29-Sep-03 7:45 
GeneralRe: SQLServer and XML RAW Pin
Mike Dimmick1-Oct-03 12:43
Mike Dimmick1-Oct-03 12:43 
GeneralRe: SQLServer and XML RAW Pin
Guillermo Rivero3-Oct-03 2:37
Guillermo Rivero3-Oct-03 2:37 
GeneralPrimary Key as a Foreign Key Pin
DotNet_Newbie29-Sep-03 6:44
DotNet_Newbie29-Sep-03 6:44 
GeneralRe: Primary Key as a Foreign Key Pin
STW2-Oct-03 22:40
STW2-Oct-03 22:40 
Generalado.net Pin
Member 23171029-Sep-03 0:37
Member 23171029-Sep-03 0:37 
GeneralRe: ado.net Pin
Roger Wright29-Sep-03 5:17
professionalRoger Wright29-Sep-03 5:17 

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.