Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update() Failed - Invalid Operation Error
Message
 
To
07/07/2006 14:41:49
Keith Payne
Technical Marketing Solutions
Florida, United States
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
01134480
Message ID:
01134911
Views:
15
This message has been marked as the solution to the initial question of the thread.
>Ben,
>
>You have probably forgotten to set the table mappings for the DataAdapter to 'tblUsers'.
>
>Before the update:
>
objAdapter.TableMappings.Add("Table1", "tblUsers")
Thank you for the input Keith. I wasn't using default table names when creating them in the DataSet so unfortunatly table mappings didn't help. But after buring myself in the code some more I did find out what my problem was. When I was calling the Update command, I was supplying the Dataset (Object) and the Table name (String) as the parameters. For some reason the Update command was not liking this usage, even though it is one of the proper signatures. I changed the parameters to be just a reference to the Table object itself inside the DataSet, and then it worked fine.

Thank again for taking the time to help. :-)
________________________
Ben Santiago, MCP & A+
Programmer Analyst (SQL, FoxPro, VB, VB.Net, Java, HTML, ASP, JSP, VBS)
Eastern Suffolk BOCES - Student Data Services


Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
-Rich Cook
Previous
Reply
Map
View

Click here to load this message in the networking platform