473,324 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Linq hierarchical update w/ TableAdapterManager

I am trying to use Update to save changes made on two DataGridView's to two
tables with a FK relationship. I say

private void bUpdate_Click(object sender, EventArgs e) {
try {

CustomerDataSetTableAdapters.TableAdapterManager taManager = new
CustomerDataSetTableAdapters.TableAdapterManager() ;
taManager.Connection = postsTableAdapter.Connection; // or should it be
// =
postDetailsTableAdapter.Connection ??
taManager.PostsTableAdapter = postsTableAdapter;
taManager.PostDetailsTableAdapter = postDetailsTableAdapter;
taManager.UpdateAll(customerDataSet);
}
catch (System.Exception ex) {
MessageBox.Show(ex.Message.ToString());
}

}
It doesn't work (DataGridView changes are not saved to the database. Also:
it doen't raise an exception).

Can you help?

Thanks

Aug 12 '08 #1
0 1547

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: ALEX KLEIN | last post by:
I want to use fabricated hierarchical recordset in VB6 using ADO. I wrote code like dim rs as adodb.recordest set rs=new adodb.recordest rs.fields.append "a1",adChar,30 Then in loop I put...
13
by: Anton.Nikiforov | last post by:
Hello everybody! Does someone know how to build hierarchical queries to the postgresql? I have a table with tree in it (id, parent) and need to find a way from any point of the tree to any...
7
by: Chris | last post by:
I am a little confused. I have been reading about LINQ and it seems to imply LINQ is available in C# 3 but not in Visual Studio until the next release. I am a VB.net programmer but would still like...
0
by: Kirsten | last post by:
I have this situation with ADO that is giving me a problem. I have two related tables - Products ProductVendors (id, VendorID, ProductID) There is a One.Product to many Vendors relation and...
8
by: Alcides | last post by:
Hello all, I learn about LINQ here in this forum. I been a VB.NET programmer for quite a while and we are using an internal solution for SQL access. I have some experience with C# and I started...
1
by: Frederik | last post by:
Hi all, Am I correct when stating that LINQ replaces somewhat DataTables? I have done some reading concerning LINQ, but I'm still puzzled as to whether I should use LINQ or not. My application...
2
by: =?Utf-8?B?anVsaW8=?= | last post by:
I am trying to use Update to save changes made on two DataGridView's to two tables (Posts & PostDetails) with a FK relationship. I say private void bUpdate_Click(object sender, EventArgs e) {...
4
by: =?Utf-8?B?RXJpYyBGYWxza2Vu?= | last post by:
We’re storing our main entity in an insert only table which stores the history of past revisions, but we’re facing problems with storing this history as LINQ will only update the entity, and...
1
by: Author | last post by:
I have an xml document that looks *like* so: <Mammal name="Cat"> <Mammal name="African Tigers" > <Mammal name="Central African Tiger" /> <Mammal name="Ethiopian Tiger" /> </Mammal> <Mammal...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.