Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Another Newbie Question
Message
De
21/10/2008 00:25:01
 
 
À
18/10/2008 14:10:06
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Versions des environnements
Environment:
VB 9.0
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01355730
Message ID:
01355995
Vues:
21
I haven't used TableAdapterManagers (or TableAdapters either, for that matter), but I suspect the problem is because you haven't defined the proper select/update/insert/delete commands when you defined your TableAdapters. I hope you are using multiple related tables in your DataSet, because the TableAdapterManager is used for hierarchical updates.

So, the docs say this about the TableAdapterManager:

The generated TableAdapterManager contains a property for each TableAdapter it manages. For example, a dataset with a Customers and Orders table is generated with a TableAdapterManager that contains CustomersTableAdapter and OrdersTableAdapter properties.

And say this about the TableAdapter:

The update functionality of a TableAdapter is dependent on how much information is available based on the main query provided in the TableAdapter Wizard. For example, TableAdapters that are configured to fetch values from multiple tables (JOINs), scalar values, views, or the results of aggregate functions are not initially created with the ability to send updates back to the underlying database. However, you can configure the INSERT, UPDATE and DELETE commands manually in the Properties window.

So, the question becomes ... how did you configure your TableAdapters? Is the data from relatively simply queries? If so, I'm guessing you missed a step somewhere in the wizard that generated these things perhaps. Not sure what else I can guess at without more information. =0(

~~Bonnie





>VS 2K8
>C#
>
>The program bombs with
>“Update requires a valid UpdateCommand when passed DataRow collection with modified rows.”
>
>when I excecute the system-generated code on the savve button of the navigation toolbar below:
>
>private void holderBindingNavigatorSaveItem_Click_1(object sender, EventArgs e)
> {
> this.Validate();
> this.holderBindingSource.EndEdit();
> this.tableAdapterManager.UpdateAll(this.portfolioDataSet);
>
>This is a two column table. One column is the identity field and the next is a name.
>
>I've configured in the dataset mgr ad nauseum.
>
>Any suggestions greatly appreciated.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform